mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: arnd@arndb.de, john.stultz@linaro.org, heenasirwani@gmail.com,
	pang.xunlei@linaro.org, linux-kernel@vger.kernel.org,
	y2038@lists.linaro.org
Subject: Re: [PATCH v3 14/22] time:Introduce the do_sys_settimeofday64() function with timespec64 type
Date: Tue, 12 May 2015 17:17:09 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1505121709390.4225@nanos> (raw)
In-Reply-To: <1431343162-29918-1-git-send-email-baolin.wang@linaro.org>

On Mon, 11 May 2015, Baolin Wang wrote:

> This patch introduces the do_sys_settimeofday64() function with timespec64
> type, that makes this function ready for 2038 issue when setting the time of day.

Copy and paste is your favourite work method, right?

> -int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
> +int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz)
>  {
>  	static int firsttime = 1;
>  	int error = 0;
> +	struct timespec ts;
>  
> -	if (tv && !timespec_valid(tv))
> +	if (tv && !timespec64_valid(tv))
>  		return -EINVAL;
>  
> -	error = security_settime(tv, tz);
> +	ts = timespec64_to_timespec(*tv);
> +	error = security_settime(&ts, tz);

How is that 2038 safe? Not at all.

I told you before that we fix the underlying functions before we add
such bogosities.

Thanks,

	tglx


  reply	other threads:[~2015-05-12 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 11:19 Baolin Wang
2015-05-12 15:17 ` Thomas Gleixner [this message]
     [not found]   ` <CAMz4kuKY3fu6B-36OGQKnAr-r8LcCrO-NhTDYzBdYF6JPiKyFg@mail.gmail.com>
2015-05-13  7:55     ` [Y2038] " Arnd Bergmann

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.1505121709390.4225@nanos \
    --to=tglx@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=heenasirwani@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pang.xunlei@linaro.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®