[Y2038] Fifth draft of the Y2038 design document
Joseph Myers
joseph@codesourcery.com
Mon Feb 27 18:46:00 GMT 2017
On Mon, 27 Feb 2017, Arnd Bergmann wrote:
> kernels, so the kernel will either always ignore the padding (which is
> a bit more work for the kernel) or it will always reject nonzero upper bits
> of the nanoseconds (as 64-bit kernels do today for native tasks, this
> means more work in 32-bit glibc, or using 64-bit nanoseconds as
> Zack suggested).
Note that the rejection for native tasks (ones where the userspace "long"
type used for tv_nsec is 64-bit) is required. For example, for utimensat,
POSIX requires an EINVAL error if "Either of the times argument structures
specified a tv_nsec value that was neither UTIME_NOW nor UTIME_OMIT, and
was a value less than zero or greater than or equal to 1000 million.".
(There are some cases where glibc deals with such rejection itself, if
e.g. it's converting an absolute timeout to a relative timeout in order to
pass the latter to the kernel.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list