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=-11.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 A2CE1C432C0 for ; Thu, 21 Nov 2019 16:27:45 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D21320692 for ; Thu, 21 Nov 2019 16:27:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D21320692 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=c-s.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47JlMy42XYzDqx9 for ; Fri, 22 Nov 2019 03:27:42 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=c-s.fr (client-ip=93.17.236.30; helo=pegase1.c-s.fr; envelope-from=christophe.leroy@c-s.fr; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47JlKT5457zDqxh for ; Fri, 22 Nov 2019 03:25:32 +1100 (AEDT) Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47JlKK4v2fz9tyYX; Thu, 21 Nov 2019 17:25:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id ZzcxYupBwo2Z; Thu, 21 Nov 2019 17:25:25 +0100 (CET) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 47JlKK3y07z9tyYW; Thu, 21 Nov 2019 17:25:25 +0100 (CET) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 38943C08; Thu, 21 Nov 2019 17:25:29 +0100 (CET) Received: from 37-167-57-154.coucou-networks.fr (37-167-57-154.coucou-networks.fr [37.167.57.154]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Thu, 21 Nov 2019 17:25:29 +0100 Date: Thu, 21 Nov 2019 17:25:29 +0100 Message-ID: <20191121172529.Horde.0uDMS4xQ-xexjp4a2mIoXQ5@messagerie.si.c-s.fr> From: Christophe Leroy To: Arnd Bergmann Subject: Re: [Y2038] [PATCH 07/23] y2038: vdso: powerpc: avoid timespec references References: <20191108210236.1296047-1-arnd@arndb.de> <20191108210824.1534248-7-arnd@arndb.de> <4faa78cd0a86cf5d0aea9bb16d03145c5745450b.camel@codethink.co.uk> In-Reply-To: User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Hutchings , y2038 Mailman List , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Nicholas Piggin , Paul Mackerras , Thomas Gleixner , linuxppc-dev , Allison Randal Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Arnd Bergmann a =C3=A9crit=C2=A0: > On Wed, Nov 20, 2019 at 11:43 PM Ben Hutchings > wrote: >> >> On Fri, 2019-11-08 at 22:07 +0100, Arnd Bergmann wrote: >> [...] >> > --- a/arch/powerpc/kernel/vdso32/gettimeofday.S >> > +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S >> > @@ -15,10 +15,8 @@ >> > /* Offset for the low 32-bit part of a field of long type */ >> > #if defined(CONFIG_PPC64) && defined(CONFIG_CPU_BIG_ENDIAN) >> > #define LOPART 4 >> > -#define TSPEC_TV_SEC TSPC64_TV_SEC+LOPART >> > #else >> > #define LOPART 0 >> > -#define TSPEC_TV_SEC TSPC32_TV_SEC >> > #endif >> > >> > .text >> > @@ -192,7 +190,7 @@ V_FUNCTION_BEGIN(__kernel_time) >> > bl __get_datapage@local >> > mr r9, r3 /* datapage ptr in r9 */ >> > >> > - lwz r3,STAMP_XTIME+TSPEC_TV_SEC(r9) >> > + lwz r3,STAMP_XTIME_SEC+LOWPART(r9) >> >> "LOWPART" should be "LOPART". >> > > Thanks, fixed both instances in a patch on top now. I considered folding > it into the original patch, but as it's close to the merge window I'd > rather not rebase it, and this way I also give you credit for=20=20 >=20finding the bug. Take care, might conflict with=20=20 https://github.com/linuxppc/linux/commit/5e381d727fe8834ca5a126f510194a7a4a= c6dd3a Christophe > >=20I'm surprised that the 0-day bot did not report this already. > > Thanks fro the careful review! > > Arnd > > commit 1c11ca7a0584ddede5b8c93057b40d31e8a96d3d (HEAD) > Author: Arnd Bergmann > Date: Thu Nov 21 15:19:49 2019 +0100 > > y2038: fix typo in powerpc vdso "LOPART" > > The earlier patch introduced a typo, change LOWPART back to > LOPART. > > Fixes: 176ed98c8a76 ("y2038: vdso: powerpc: avoid timespec references= ") > Reported-by: Ben Hutchings > Signed-off-by: Arnd Bergmann > > diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S > b/arch/powerpc/kernel/vdso32/gettimeofday.S > index a7180b0f4aa1..c8e6902cb01b 100644 > --- a/arch/powerpc/kernel/vdso32/gettimeofday.S > +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S > @@ -190,7 +190,7 @@ V_FUNCTION_BEGIN(__kernel_time) > bl __get_datapage@local > mr r9, r3 /* datapage ptr in r9 */ > > - lwz r3,STAMP_XTIME_SEC+LOWPART(r9) > + lwz r3,STAMP_XTIME_SEC+LOPART(r9) > > cmplwi r11,0 /* check if t is NULL */ > beq 2f > @@ -266,7 +266,7 @@ __do_get_tspec: > * as a 32.32 fixed-point number in r3 and r4. > * Load & add the xtime stamp. > */ > - lwz r5,STAMP_XTIME_SEC+LOWPART(r9) > + lwz r5,STAMP_XTIME_SEC+LOPART(r9) > > lwz r6,STAMP_SEC_FRAC(r9) > addc r4,r4,r6 > adde r3,r3,r5