linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Safonov <dima@arista.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	y2038@lists.linaro.org, Thomas Gleixner <tglx@linutronix.de>,
	John Stultz <john.stultz@linaro.org>
Cc: linux-aio@kvack.org, Stephen Boyd <sboyd@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Benjamin LaHaise <bcrl@kvack.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [Y2038] [PATCH 01/23] y2038: remove CONFIG_64BIT_TIME
Date: Wed, 20 Nov 2019 22:58:19 +0000	[thread overview]
Message-ID: <892d8856-4d0a-2ef0-b8e6-0c94f39ea54d@arista.com> (raw)
In-Reply-To: <638f6bcc2f7ecf96eda85973457a8d69b0a7640e.camel@codethink.co.uk>

On 11/20/19 10:28 PM, Ben Hutchings wrote:
> On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote:
> [...]
>> --- a/kernel/time/time.c
>> +++ b/kernel/time/time.c
>> @@ -267,7 +267,7 @@ COMPAT_SYSCALL_DEFINE2(settimeofday, struct old_timeval32 __user *, tv,
>>  }
>>  #endif
>>  
>> -#if !defined(CONFIG_64BIT_TIME) || defined(CONFIG_64BIT)
>> +#ifdef CONFIG_64BIT
>>  SYSCALL_DEFINE1(adjtimex, struct __kernel_timex __user *, txc_p)
>>  {
>>  	struct __kernel_timex txc;		/* Local copy of parameter */
>> @@ -884,7 +884,7 @@ int get_timespec64(struct timespec64 *ts,
>>  	ts->tv_sec = kts.tv_sec;
>>  
>>  	/* Zero out the padding for 32 bit systems or in compat mode */
>> -	if (IS_ENABLED(CONFIG_64BIT_TIME) && in_compat_syscall())
>> +	if (in_compat_syscall())
>>  		kts.tv_nsec &= 0xFFFFFFFFUL;
>>  
>>  	ts->tv_nsec = kts.tv_nsec;
> [...]
> 
> It's not a problem with this patch, but I noticed that this condition
> doesn't match what the comment says.  It looks like it was broken by:
> 
> commit 98f76206b33504b934209d16196477dfa519a807
> Author: Dmitry Safonov <dima@arista.com>
> Date:   Fri Oct 12 14:42:53 2018 +0100
> 
>     compat: Cleanup in_compat_syscall() callers
> 

Ugh, you right. I've failed to read the condition and thought it's
related to CONFIG_COMPAT :(
I'll send a fix shortly, thanks for spotting this!

-- 
          Dmitry

  reply	other threads:[~2019-11-20 22:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 21:02 [PATCH 00/23] y2038 cleanups Arnd Bergmann
2019-11-08 21:07 ` [PATCH 01/23] y2038: remove CONFIG_64BIT_TIME Arnd Bergmann
2019-11-20 22:28   ` [Y2038] " Ben Hutchings
2019-11-20 22:58     ` Dmitry Safonov [this message]
2019-11-08 21:12 ` [PATCH 12/23] y2038: syscalls: change remaining timeval to __kernel_old_timeval Arnd Bergmann
2019-11-11 12:44   ` Christian Brauner
2019-11-13 22:39   ` Rafael J. Wysocki
2019-11-08 21:12 ` [PATCH 15/23] y2038: elfcore: Use __kernel_old_timeval for process times Arnd Bergmann
2019-11-08 21:12 ` [PATCH 16/23] y2038: timerfd: Use timespec64 internally Arnd Bergmann
2019-11-13 21:49   ` Thomas Gleixner
2019-11-13 21:40 ` [PATCH 00/23] y2038 cleanups 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=892d8856-4d0a-2ef0-b8e6-0c94f39ea54d@arista.com \
    --to=dima@arista.com \
    --cc=arnd@arndb.de \
    --cc=bcrl@kvack.org \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=davem@davemloft.net \
    --cc=john.stultz@linaro.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).