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: <CAK8P3a1UpXKwPD=pNyaq3UOB3KhdoeN9804co6zyf-jBrO_ZJA@mail.gmail.com>
Date:   Tue, 21 Mar 2017 09:19:05 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Thomas Gleixner <tglx@...utronix.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 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.

The other point that Deepa made is important for verification purposes:
If we can eliminate timespec/time_t/timeval from all in-kernel code, we have
a much better chance at showing that we have no y2038 problems.
I did a private patch series to try this out a while ago, and managed to
actually get the kernel to build fine with no 32-bit time_t code left in
it (lots of minor drivers being marked in Kconfig as depending on old time_t)

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ