lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 16 Mar 2018 01:02:04 +0100 (CET) From: Thomas Gleixner <tglx@...utronix.de> To: Arnd Bergmann <arnd@...db.de> cc: John Stultz <john.stultz@...aro.org>, Stephen Boyd <sboyd@...nel.org>, Al Viro <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org Subject: Re: [PATCH] [v3] y2038: introduce struct __kernel_old_timeval On Thu, 15 Mar 2018, Arnd Bergmann wrote: > + * legacy timeval structure, only embedded in structures that > + * traditionally used 'timeval' to pass time intervals (not absolute > + * times). Do not add new users. If user space fails to compile > + * here, this is probably because it is not y2038 safe and needs to > + * be changed to use another interface. > + */ > +struct __kernel_old_timeval { > + __kernel_long_t tv_sec; > + __kernel_long_t tv_usec; > +}; > + > +/* > * The IDs of the various system clocks (for POSIX.1b interval timers): > */ > #define CLOCK_REALTIME 0 > diff --git a/kernel/time/time.c b/kernel/time/time.c > index 5db8f15ec056..6fa99213fc72 100644 > --- a/kernel/time/time.c > +++ b/kernel/time/time.c > @@ -486,6 +486,18 @@ struct timeval ns_to_timeval(const s64 nsec) > } > EXPORT_SYMBOL(ns_to_timeval); > > +struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec) > +{ > + struct timespec64 ts = ns_to_timespec64(nsec); > + struct __kernel_old_timeval tv; > + > + tv.tv_sec = ts.tv_sec; We might think about adding some debug aid here which yells when ts.tv_sec is > than the cutoff. Hmm? tglx
Powered by blists - more mailing lists