Messages in this thread | | | From | Linus Torvalds <> | Date | Mon, 11 Apr 2022 20:49:13 -1000 | Subject | Re: [PATCH] stat: don't fail if the major number is >= 256 |
| |
On Mon, Apr 11, 2022 at 7:37 PM Linus Torvalds <torvalds@linux-foundation.org> wrote: > > Correct. It's literally the compat structure that has no basis in reality. > > Or it might be some truly ancient thing, but I really don't think so.
I was intrigued, so I went back and checked.
unsigned short st_dev; unsigned short __pad1;
is in fact historical. But it was changed to
unsigned long st_dev;
(for i386, so this is a 32-bit 'unsigned long') on April 2, 2003.
From the BK tree conversion:
https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=e95b2065677fe32512a597a79db94b77b90c968d
so I think we should just make sure that the 64-bit compat system call is compatible with that 2003+ state, not with some truly ancient state.
Linus
| |