Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp704441yba; Fri, 26 Apr 2019 07:27:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsPWOuiQ2RHR7iPsnMqohEzZthaNKaS0LJQof+Ku21F6mfDrcrhg4T0g0Q8hOJIiVqONLF X-Received: by 2002:aa7:8212:: with SMTP id k18mr46533064pfi.50.1556288849107; Fri, 26 Apr 2019 07:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556288849; cv=none; d=google.com; s=arc-20160816; b=wkyAudK9G1iBXjwN+rMD+6UnEupjQBSdiU9UQg1OxQRnN5vp18+rVsa57dGkMJXHFc E4ty2Kd1kcDGyCHr1BeHH1E9Q5cYF9X+JrNsXOtAu0Mufj4J+fexYK5jE3pv4BSxW3yF zGv4IVEBzvm3qtCK2I7jdLG9K+6r2WQSq+CE4AbSTn5NUY6Z9VdnHZhttPlatEQO+7VA 7lkLNqnGwnfQTHyklZaqSiXThMIR0EGHPOnPRMJjN9iaEgXYHgRHIiE4434QEPRJRoLB Nmyc7dSinpvp+7T5FA+sCNLptAEtWNarrUvr4WEayRsLNnQg+QHhfiUugHkihl55eNsD Vb8g== 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 :message-id:date:subject:cc:to:from; bh=7uTGctWVk16IKeJtHknTgAF17YoZGFCLdDdh8Yxlrgo=; b=veTumrAihjEbbSVuN1t7eI6E7ZwPtUL5KS7hdBQju3KKUnaYe56olMyPhAO5Aod2y4 cELTEqUIY2npnwdOOE38gle3cFWXgnSuubOny+iSI1TbWKdT/XWC2v7dziE787D1yY/j veZi5FNv04wERx6Z7UBMXOgv4vmQ9/JGbea2+GX0tDNhitYumhAaC2U6+6IZhCmpkrMQ kSPZEQhCpiS3XSlWcSkfdEn27CrTbJpxhIjzI0IJXXu1dlgGBZFl0aGf+LwOMwu5dNTH RXCdGoX8ojJv/2Ihd/CVUQ1TycnxxdrPKpmu4HQ7O/6gW2cSrPhlVoldqYhCDD/qKoDY mb9g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si25488660plb.346.2019.04.26.07.27.13; Fri, 26 Apr 2019 07:27:29 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726458AbfDZOZr (ORCPT + 99 others); Fri, 26 Apr 2019 10:25:47 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:34199 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfDZOZr (ORCPT ); Fri, 26 Apr 2019 10:25:47 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MbTCr-1gmtxm3d05-00buge; Fri, 26 Apr 2019 16:25:35 +0200 From: Arnd Bergmann To: Thomas Gleixner Cc: Joseph Myers , libc-alpha@sourceware.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Deepa Dinamani , Arnd Bergmann , Lukasz Majewski , Stepan Golosunov Subject: [PATCH 1/2] y2038: make CONFIG_64BIT_TIME unconditional Date: Fri, 26 Apr 2019 16:25:04 +0200 Message-Id: <20190426142531.1378357-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:f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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As Stepan Golosunov points out, we made a small mistake in the get_timespec64() function in the kernel. It was originally added under the assumption that CONFIG_64BIT_TIME would get enabled on all 32-bit and 64-bit architectures, but when I did the conversion, I only turned it on for 32-bit ones. The effect is that the get_timespec64() function never clears the upper half of the tv_nsec field for 32-bit tasks in compat mode. Clearing this is required for POSIX compliant behavior of functions that pass a 'timespec' structure with a 64-bit tv_sec and a 32-bit tv_nsec, plus uninitialized padding. The easiest fix for linux-5.1 is to just make the Kconfig symbol unconditional, as it was originally intended. As a follow-up, we should remove any #ifdef CONFIG_64BIT_TIME completely. Link: https://lore.kernel.org/lkml/20190422090710.bmxdhhankurhafxq@sghpc.golosunov.pp.ru/ Cc: Lukasz Majewski Cc: Stepan Golosunov Signed-off-by: Arnd Bergmann --- Please apply this one as a bugfix for 5.1 --- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 33687dddd86a..9092e0ffe4d3 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -764,7 +764,7 @@ config COMPAT_OLD_SIGACTION bool config 64BIT_TIME - def_bool ARCH_HAS_64BIT_TIME + def_bool y help This should be selected by all architectures that need to support new system calls with a 64-bit time_t. This is relevant on all 32-bit -- 2.20.0