Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1605407
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 |
| Date | 2017-03-21 09:20 +0100 |
| Message-ID | <tnnbk-Bl-17@gated-at.bofh.it> (permalink) |
| References | <tmBzH-XZ-5@gated-at.bofh.it> <tmBzI-XZ-15@gated-at.bofh.it> <tmGJ5-4r7-33@gated-at.bofh.it> <tncfU-1A9-15@gated-at.bofh.it> <tncpz-1Dt-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Mar 20, 2017 at 9:40 PM, Thomas Gleixner <tglx@linutronix.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RESEND PATCH 0/7] Change k_clock interfaces to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-19 06:30 +0100
[RESEND PATCH 1/7] time: Delete do_sys_setimeofday() Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-19 06:30 +0100
Re: [RESEND PATCH 1/7] time: Delete do_sys_setimeofday() Thomas Gleixner <tglx@linutronix.de> - 2017-03-19 12:00 +0100
Re: [RESEND PATCH 1/7] time: Delete do_sys_setimeofday() kbuild test robot <lkp@intel.com> - 2017-03-21 18:30 +0100
Re: [RESEND PATCH 1/7] time: Delete do_sys_setimeofday() Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-21 20:00 +0100
[RESEND PATCH 3/7] Change k_clock clock_get() to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-19 06:30 +0100
Re: [RESEND PATCH 3/7] Change k_clock clock_get() to use timespec64 Thomas Gleixner <tglx@linutronix.de> - 2017-03-19 12:10 +0100
[RESEND PATCH 5/7] Change k_clock clock_set() to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-19 06:30 +0100
[RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-19 06:30 +0100
Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Thomas Gleixner <tglx@linutronix.de> - 2017-03-19 12:00 +0100
Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-20 21:40 +0100
Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Thomas Gleixner <tglx@linutronix.de> - 2017-03-20 21:50 +0100
Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Arnd Bergmann <arnd@arndb.de> - 2017-03-21 09:20 +0100
Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Thomas Gleixner <tglx@linutronix.de> - 2017-03-21 10:10 +0100
Re: [Y2038] [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Tomoyoshi ASANO <asa@lineo.co.jp> - 2017-03-20 23:50 +0100
Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Richard Cochran <richardcochran@gmail.com> - 2017-03-19 19:10 +0100
Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-20 21:40 +0100
[RESEND PATCH 7/7] Change k_clock nsleep() to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-19 06:30 +0100
[RESEND PATCH 6/7] Change k_clock timer_set() and timer_get() to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-19 06:30 +0100
Re: [RESEND PATCH 0/7] Change k_clock interfaces to use timespec64 Thomas Gleixner <tglx@linutronix.de> - 2017-03-19 12:10 +0100
Re: [RESEND PATCH 0/7] Change k_clock interfaces to use timespec64 Deepa Dinamani <deepa.kernel@gmail.com> - 2017-03-20 21:40 +0100
csiph-web