Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2447728ybc; Wed, 20 Nov 2019 14:30:11 -0800 (PST) X-Google-Smtp-Source: APXvYqw3VsnjOmi0ClrnJeTAXKPd0VpA4chKHr6Kd/HUq2gAvbRMCSedy1UFRKplLmGac+zvCrWD X-Received: by 2002:a17:906:edd2:: with SMTP id sb18mr8747847ejb.112.1574289011837; Wed, 20 Nov 2019 14:30:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574289011; cv=none; d=google.com; s=arc-20160816; b=QE7snVEmuWLJZEYVVXtziKwSfBvC2DTqTJyrlX4vU00Oyf9GHKYRaMze8K4avyiUTF YSJPnBvGBCwATnKrP9GcUWW14HMI2Ksvnmjq1o5XzzkRdTxQ0OTHmJ2Sq4Sa5fKBzV8M NYbmrXvW2mg27+3c1Qovx5AtqgnueTyJyqV9lE4Nrz+vqoRQ2HpAClHWSknzIho7+h3x FvF6b826RrDa1UkibFhDx4RkypOedffFD88Qi2/ktHgXlO3j57dYQz7qEw19EayDUxUC 68mrs8xdDPr1fBMVrA9T5IROSzpbFCZlFgPl78/ohxaFnkvnqFlKztujuLIt8ARYwqRj KL1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=pqmAlC4oxRQn9BGs6hHcnRgyvRZ/fzCkpHLXp0OCAXg=; b=wiMQQgfCI3LDpA74zaBLF0CJ5M0Da8g/4+1Qp/fyXe+++ERPnYaDg25EO/7lqrNGfa yHPkn+j/EXe3trw4GzQOEf6hElD9wKJlH6TWnFrtpVXlMm4dPGhsr15XRhWVlOmI/HCw VaGhHfIYtuZWoPWQigkwz5e33Zx866jpXBN6C7miPIgEc1H18Nq5MzMjxTAHNZXn5sbW SMQkLeaTLzczql7IVRgFwchvhtd8QiK9fzz7HCDDtvn86CKyIktYl3KVCDhwOasQ0AFG J8efHpUmE8+RjVmYRVA3eVAfKiWf6Eu1gRFYD4R6v+nZgxIaUV8vRweklvUlTcIQUviG DsAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si380247eju.362.2019.11.20.14.29.46; Wed, 20 Nov 2019 14:30:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbfKTW2f (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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