This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v9] y2038: Introduce the __ASSUME_TIME64_SYSCALLS define


On Fri, 30 Aug 2019, Rich Felker wrote:

> On Fri, Aug 30, 2019 at 04:36:55PM +0000, Joseph Myers wrote:
> > On Fri, 30 Aug 2019, Rich Felker wrote:
> > 
> > > To clarify, none of the timespec ones "exactly match" -- the suffixed
> > > syscalls on 32-bit require filling the padding around tv_nsec, whereas
> > 
> > What do you mean by "require filling the padding"?  I thought the 
> > conclusion in the kernel was that it dealt with zeroing the padding when 
> > reading a timespec64 from userspace on a 32-bit system (with the caveat of 
> > that not happening for compat tasks under 64-bit kernels before 5.1.5, and 
> > so the question in 
> > <https://sourceware.org/ml/libc-alpha/2019-05/msg00698.html> of whether to 
> > treat 5.1.0 through 5.1.4 as buggy and unsupported).
> 
> I wasn't aware of this change. Being that the unfortunate behavior
> actually appeared in released kernel versions, I would lean towards
> assuming userspace has to patch it up. I'm skeptical of just

If it has to patch it up, it clearly does not need to do so when 5.1.5 or 
later is the configured minimum kernel - or on 32-bit-only architectures 
where the compat syscall case is irrelevant.  (Whether we wish to include 
a special case for that as a micro-optimization in code which already has 
a lot of complicated conditionals is another matter, but if we include 
code to patch things up it should be arranged in a way that makes it easy 
to find and remove all of it once 5.1.5 or later is the minimum supported 
kernel version for glibc.)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]