Re: RFD: x32 ABI system call numbers

From: Arnd Bergmann
Date: Wed Aug 31 2011 - 16:56:55 EST


On Wednesday 31 August 2011 13:02:15 H. Peter Anvin wrote:
> On 08/31/2011 12:54 PM, Alan Cox wrote:
> >>
> >> The only reason I mentioned redefining 32-bit time_t as unsigned was for
> >> *legacy ABIs*.
> >
> > But if you redefine it then it's not a legacy ABI any more - its a new
> > ABI.
>
> Only sort-of-kind of. It's like hacking around the Y2K problem by date
> windowing; it technically it is an ABI change but when it is going to
> break anyway...

But isn't this mostly a glibc thing then? The definition of time_t that
is used by applications comes from bits/typesizes.h, not from the
kernel's linux/types.h. If we use 64 bit time_t values internally
in the kernel and truncate them to 32 bits on the user interface,
there is no visible difference between signed and unsigned values
for data passed from kernel to user when it's interpreted as
signed int anyway.

For the rarer case of user space passing a 32 bit time_t into the
kernel (e.g. utimensat), there is of course a difference.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/