From patchwork Thu May 23 19:07:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 165061 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2625092ili; Thu, 23 May 2019 12:31:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwx9u++94UIyTv67gQRV+GzfHyrKEFaRAu5NlwaQ/7mCX4t4zXby0evH5V7VvCK+83HakJ2 X-Received: by 2002:a63:e24:: with SMTP id d36mr3745218pgl.80.1558639894275; Thu, 23 May 2019 12:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558639894; cv=none; d=google.com; s=arc-20160816; b=CaIZkzraJRGVhd9qQ+mC50LWcuzYF0mOsldhDEDT6ODYV2QTIS0lfRUrHmlhvK204E bJPnETDZgYVc+u6cZt0QMOqqVFji4W4VdT6uHcMBIGi652tFLwJcUQKl1ug3QsFEV0/x /pEyEefVhOsq+N3EJIECfjBwWjly4BDHnPgSoZWMCLqH6lLEYpGgl14ZUswVjb4Z48Z+ 3ErBOKnGMIKrREDrfkvciTq8gwso1iegj+BwpwpxQMScx8De+XcF4IWm2y448xGer0VO j3YjL2W1DpWBmRzepiJbbx2gKVY9a+ClqY2BQ5HCKmm+LfrEZyCkd7FiwIqpB/A7r5NG iBXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :delivered-to:sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=6lPnzk/v29J0xE0fZTlC9XVdT47ZB9QZxmcEYvpSwQo=; b=ZyUJeJXlDABKkRgwCkLzlZ/zfadQdzPzaTn22HemHVY0wwKba9Ugiz6oB0A3/rJL33 ZnUkvLR2KZitrQA3FbjKm5ygN3R4Vno8K1y2tMWtmNbAfcZHxuUz0E3JRxxx+JKAw169 xKgC4udTpiJCrfD/K6uiwRV/MjrM7LmChOaZ1PIclzVkrvN1xd/d7LwcL2n2xqwr0FOv Xy+xnrqdHk5ffcLVR6mu6Ub0AhEO5yOwcYYyHOHtmR6pzNNtVNlxXdW6pwwqzWkIguTk K4DYzRU0Q3FckuOscOGuQT6N4d0jMBOLSy3LZDyjYSe5UkN6Q832JQf1jC2vAak2LgDi 2YLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=iAlabLzP; dkim=pass header.i=@kernel.org header.s=default header.b="fAepko/j"; spf=pass (google.com: domain of libc-alpha-return-102226-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102226-patch=linaro.org@sourceware.org" Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q14si586744pgg.521.2019.05.23.12.31.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 12:31:34 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-102226-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=iAlabLzP; dkim=pass header.i=@kernel.org header.s=default header.b="fAepko/j"; spf=pass (google.com: domain of libc-alpha-return-102226-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102226-patch=linaro.org@sourceware.org" DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=izehw0RjeXURjgXI+WeBTnAanhL4mjJ3wWHByd+q5Al bScnj8KNGUz+FhjO+oupt526mJlGX2+8iqUAjKvAv4u0pVny2nwZnPxDBcH0Gr34 H95ExKQfMiS5vvk1GJ34ZlKuilR2INjcf8xsod/RKWV9lfH02GmWdtH8Fzb3joWk = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=vMXubXnHA8lCJ4Uer9iduoHN8rA=; b=iAlabLzPd814mWar3 5CIjqf0hiAh9vWobkgcimpzbQatw2J9M/CrO/ZSXg3myqnXS/K1ahNT3wuAxwvnq n5kkWQEkqa0g3g4r+zGHulOnRmVQvJ+qYqIfeVrvxTP9/++ozxcW/FmCiRyqmnRE /kGbQDxYsaUqn7MSUwfuDuhEFk= Received: (qmail 44420 invoked by alias); 23 May 2019 19:31:25 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 44392 invoked by uid 89); 23 May 2019 19:31:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558639882; bh=bazesv1zlSbhV7hBl7cRwPHNDrdniWGCiApnCNuxURc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fAepko/joRL5VIrpsCpIZqZ37DhZdU/80iezQtMendrw9IrxfVDYkUt/pJiRdBfHB JJDYPpNz3uYcuo0XNNUszrbVMD+ax0scZIMugW07uTiLd/dSbeIYJP7cv3Bpddf2EI JUxdi+NuPIZ+iwNceiFU3nAIlkDXp/W60ThZLJjg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Thomas Gleixner , Joseph Myers , libc-alpha@sourceware.org, linux-api@vger.kernel.org, Deepa Dinamani , Lukasz Majewski , Stepan Golosunov Subject: [PATCH 5.1 119/122] y2038: Make CONFIG_64BIT_TIME unconditional Date: Thu, 23 May 2019 21:07:21 +0200 Message-Id: <20190523181721.342941070@linuxfoundation.org> In-Reply-To: <20190523181705.091418060@linuxfoundation.org> References: <20190523181705.091418060@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 From: Arnd Bergmann commit f3d964673b2f1c5d5c68c77273efcf7103eed03b upstream. As Stepan Golosunov points out, there is 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 the conversion was done, it was only turned 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, the #ifdef CONFIG_64BIT_TIME can be removed completely.. Note: for native 32-bit mode, no change is needed, this works as designed and user space should never need to clear the upper 32 bits of the tv_nsec field, in or out of the kernel. Fixes: 00bf25d693e7 ("y2038: use time32 syscall names on 32-bit") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Joseph Myers Cc: libc-alpha@sourceware.org Cc: linux-api@vger.kernel.org Cc: Deepa Dinamani Cc: Lukasz Majewski Cc: Stepan Golosunov Link: https://lore.kernel.org/lkml/20190422090710.bmxdhhankurhafxq@sghpc.golosunov.pp.ru/ Link: https://lkml.kernel.org/r/20190429131951.471701-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman --- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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