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: y2038@lists.linaro.org, Baolin Wang <baolin.wang@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [Y2038] [PATCH v4 06/25] time/posix-timers:Introduce {get, put}_timespec and {get, put}_itimerspec
Date: Fri, 5 Jun 2015 11:59:35 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1506051159110.4155@nanos> (raw)
In-Reply-To: <13035006.xRdC2jB7D9@wuerfel>

On Thu, 4 Jun 2015, Arnd Bergmann wrote:
> int get_timespec64(struct timespec64 *ts, const struct timespec __user *uts)
> {
> 	struct timespec64 tmp;
> 	int ret;
> 
> 	if (sizeof(tmp) == sizeof(*ts))
> 		return copy_from_user(&tmp, uts, sizeof(*ts)) ? -EFAULT : 0;
> 
> 	ret = copy_from_user(&tmp, uts, sizeof(*ts));
> 	if (ret)
> 		return -EFAULT;
> 
> 	ts->tv_sec = tmp.tv_sec;
> 	ts->tv_nsec = tmp.tv_nsec;
> 
> 	return 0;
> }
> 
> This works fine, but I'd have to change it to copy from a __user
> __kernel_timespec instead of timespec in my system call series, and
> in order to do that, we must ensure that I can change over all callers
> at the same time, so with the function prototype above, we should not
> start using get_timespec64 for anything outside of posix-timers.c.

That's fine I think.

Thanks,

	tglx

      reply	other threads:[~2015-06-05  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 11:55 [PATCH v4 06/25] time/posix-timers:Introduce {get,put}_timespec and {get,put}_itimerspec Baolin Wang
2015-06-02 19:20 ` Thomas Gleixner
2015-06-04 15:04   ` [Y2038] [PATCH v4 06/25] time/posix-timers:Introduce {get, put}_timespec and {get, put}_itimerspec Arnd Bergmann
2015-06-05  9:59     ` Thomas Gleixner [this message]

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.11.1506051159110.4155@nanos \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@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®