From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0A4BC432C0 for ; Wed, 20 Nov 2019 22:28:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 994E720857 for ; Wed, 20 Nov 2019 22:28:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726529AbfKTW2f (ORCPT ); Wed, 20 Nov 2019 17:28:35 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:37075 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725878AbfKTW2f (ORCPT ); Wed, 20 Nov 2019 17:28:35 -0500 Received: from [167.98.27.226] (helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iXYSW-0005ym-Qa; Wed, 20 Nov 2019 22:28:24 +0000 Message-ID: <638f6bcc2f7ecf96eda85973457a8d69b0a7640e.camel@codethink.co.uk> Subject: Re: [Y2038] [PATCH 01/23] y2038: remove CONFIG_64BIT_TIME From: Ben Hutchings To: Arnd Bergmann , y2038@lists.linaro.org, Thomas Gleixner , John Stultz Cc: linux-aio@kvack.org, Stephen Boyd , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin LaHaise , Alexander Viro , linux-fsdevel@vger.kernel.org, "David S. Miller" , Dmitry Safonov Date: Wed, 20 Nov 2019 22:28:23 +0000 In-Reply-To: <20191108210824.1534248-1-arnd@arndb.de> References: <20191108210236.1296047-1-arnd@arndb.de> <20191108210824.1534248-1-arnd@arndb.de> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 Date: Fri Oct 12 14:42:53 2018 +0100 compat: Cleanup in_compat_syscall() callers Ben. -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom