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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1703211002470.3617@nanos>
Date:   Tue, 21 Mar 2017 10:04:09 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Arnd Bergmann <arnd@...db.de>
cc:     Deepa Dinamani <deepa.kernel@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        John Stultz <john.stultz@...aro.org>,
        y2038 Mailman List <y2038@...ts.linaro.org>
Subject: Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to
 use timespec64

On Tue, 21 Mar 2017, Arnd Bergmann wrote:

> On Mon, Mar 20, 2017 at 9:40 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> > On Mon, 20 Mar 2017, Deepa Dinamani wrote:
> >> >> -static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp)
> >> >> +static int ptp_clock_getres(struct posix_clock *pc, struct timespec64 *tp)
> >> >
> >> > That's a pretty pointless exercise. getres() returns the resolution of the
> >> > clock which obviously can never be affected by Y2038.
> >>
> >> True, tv_sec does not need to be more than 32 bits here.
> >> We plan to limit the use of struct timespec to existing user interfaces only.
> >
> > This is an existing user space interface and there is no need to change it
> > at all.
> 
> I think we should change it in the kernel, otherwise every libc implementation
> has to include a copy of this, to convert between the user space 16-byte
> timespec and the 8-byte kernel timespec. If we do it in the kernel, we only
> need one copy and the interface is consistent between 32-bit and 64-bit
> user space.

Fair enough. Please add a comment which explains why this uses a timespec64
as it is not obvious - as demonstrated :)

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ