mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Deepa Dinamani <deepa.kernel@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	y2038 Mailman List <y2038@lists.linaro.org>
Subject: Re: [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64
Date: Tue, 21 Mar 2017 10:04:09 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703211002470.3617@nanos> (raw)
In-Reply-To: <CAK8P3a1UpXKwPD=pNyaq3UOB3KhdoeN9804co6zyf-jBrO_ZJA@mail.gmail.com>

On Tue, 21 Mar 2017, Arnd Bergmann wrote:

> 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.

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

Thanks,

	tglx

  reply	other threads:[~2017-03-21  9:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-19  5:17 [RESEND PATCH 0/7] Change k_clock " Deepa Dinamani
2017-03-19  5:17 ` [RESEND PATCH 1/7] time: Delete do_sys_setimeofday() Deepa Dinamani
2017-03-19 10:57   ` Thomas Gleixner
2017-03-21 17:21   ` kbuild test robot
2017-03-21 18:57     ` Deepa Dinamani
2017-03-19  5:17 ` [RESEND PATCH 2/7] time: Change posix clocks ops interfaces to use timespec64 Deepa Dinamani
2017-03-19 10:51   ` Thomas Gleixner
2017-03-20 20:39     ` Deepa Dinamani
2017-03-20 20:40       ` Thomas Gleixner
2017-03-21  8:19         ` Arnd Bergmann
2017-03-21  9:04           ` Thomas Gleixner [this message]
2017-03-20 21:40     ` [Y2038] " Tomoyoshi ASANO
2017-03-19 18:06   ` Richard Cochran
2017-03-20 20:38     ` Deepa Dinamani
2017-03-19  5:17 ` [RESEND PATCH 3/7] Change k_clock clock_get() " Deepa Dinamani
2017-03-19 11:03   ` Thomas Gleixner
2017-03-19  5:17 ` [RESEND PATCH 4/7] Change k_clock clock_getres() " Deepa Dinamani
2017-03-19  5:17 ` [RESEND PATCH 5/7] Change k_clock clock_set() " Deepa Dinamani
2017-03-19  5:17 ` [RESEND PATCH 6/7] Change k_clock timer_set() and timer_get() " Deepa Dinamani
2017-03-19  5:17 ` [RESEND PATCH 7/7] Change k_clock nsleep() " Deepa Dinamani
2017-03-19 11:06 ` [RESEND PATCH 0/7] Change k_clock interfaces " Thomas Gleixner
2017-03-20 20:39   ` Deepa Dinamani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1703211002470.3617@nanos \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=deepa.kernel@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®