From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3C0C81F463 for ; Thu, 2 Jan 2020 12:07:43 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=k7UUbs9cy1pSorWz gPk4G6xZQSwvPM6aeEiSFVc1bczYVH0Xem9JvKUec0GUgsRdfW1p6KdWN/jvaxY6 3LuMQJw3bFZ7vPYA+eAzZIgwsHez2vDnqzbmDzCBTWk10w419nWy9OXJvXvCNM3C uNS//t60uz/GYm+7gYrcEx7QVQ8= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=m6zhkuxFh+dFtCRxNU/1wA TzdUo=; b=YM1p9xmiFVF2zlcmgUvW4IXlu3kERRCUXLkWk9TCBis4Bj2Mn/LxXn s4Brha7O8aSMjtflRYNpeqi/Aa3Xw92FEQfo1l5A1QOzr2eCKI5CxdHCWmwYA7iO yIyc5rX0wnErCUHGN3wf+6Vdg0tSWJ2NLRwoSW77uFf+p9yZdmrRw= Received: (qmail 19070 invoked by alias); 2 Jan 2020 12:07:40 -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 Received: (qmail 19058 invoked by uid 89); 2 Jan 2020 12:07:39 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: brown.elm.relay.mailchannels.net X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Descriptive-Occur: 11cf25797b5294f2_1577966855884_1465109344 X-MC-Loop-Signature: 1577966855884:3387958120 X-MC-Ingress-Time: 1577966855884 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=m6zhku xFh+dFtCRxNU/1wATzdUo=; b=fBaP4N2ZePpO73ENF1HttBlW8DCQMbXW92rbZ8 4c8vFfpr/jKjnzDipLbIX9W26almNy8xw/Z7Zsb6Y4r05miAsGVgKAuwjevUqnu7 13Iao9QqBu9mjSaLMHqv+gHOE+DKGlP+p2fJ6REjkxLlLMMaIVC5cf1CKXFe+r7P dNsOE= Subject: Re: [PATCH v2 01/16] linux: Fix vDSO macros build with time64 interfaces To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20191217214728.2886-1-adhemerval.zanella@linaro.org> X-DH-BACKEND: pdx1-sub0-mail-a59 From: Siddhesh Poyarekar Message-ID: <3b8a5f8f-40bb-9b91-e4d1-bf84dd258fcf@gotplt.org> Date: Thu, 2 Jan 2020 17:37:10 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20191217214728.2886-1-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvdeguddgfeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepufhiugguhhgvshhhucfrohihrghrvghkrghruceoshhiugguhhgvshhhsehgohhtphhlthdrohhrgheqnecuffhomhgrihhnpehsohhurhgtvgifrghrvgdrohhrghenucfkphepuddvfedrvdehvddrvddtvddrudejvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghloheplgduledvrdduieekrddurdeljegnpdhinhgvthepuddvfedrvdehvddrvddtvddrudejvddprhgvthhurhhnqdhprghthhepufhiugguhhgvshhhucfrohihrghrvghkrghruceoshhiugguhhgvshhhsehgohhtphhlthdrohhrgheqpdhmrghilhhfrhhomhepshhiugguhhgvshhhsehgohhtphhlthdrohhrghdpnhhrtghpthhtoheprgguhhgvmhgvrhhvrghlrdiirghnvghllhgrsehlihhnrghrohdrohhrghenucevlhhushhtvghrufhiiigvpedt On 18/12/19 3:17 am, Adhemerval Zanella wrote: > Changes from previous version: > > - Reinstate syscall fallback on INLINE_VSYSCALL, it simplifies > when the macro is used multiple times (as for clock_gettime > and clock_getres). > > -- > > As indicated on libc-help [1] the ec138c67cb commit broke 32-bit > builds when configured with --enable-kernel=5.1 or higher. The > scenario 10 from [2] might also occur in this configuration and What is scenario 10 from [2]? > INLINE_VSYSCALL will try to use the vDSO symbol and > HAVE_CLOCK_GETTIME64_VSYSCALL does not set HAVE_VSYSCALL prior its > usage. > > Also, there is no easy way to just enable the code to use one > vDSO sysmbo since the macro INLINE_VSYSCALL is redefined if symbol > HAVE_VSYSCALL is set. > > Instead of adding more pre-processor handling and making the code > even more convoluted, this patch removes the requirement of defining > HAVE_VSYSCALL before including sysdep-vdso.h to enable vDSO usage. > > The INLINE_VSYSCALL is now expected to be issued inside a > HAVE_*_VSYSCALL check, since it will try to use the internal vDSO > pointers. > > Both clock_getres and clock_gettime vDSO code for time64_t were > removed since there is no vDSO setup code for the symbol (an > architecture can not set HAVE_CLOCK_GETTIME64_VSYSCALL). > > Checked on i686-linux-gnu (default and with --enable-kernel=5.1), > x86_64-linux-gnu, aarch64-linux-gnu, and powerpc64le-linux-gnu. > I also checked against a build to mips64-linux-gnu and > sparc64-linux-gnu. > > [1] https://sourceware.org/ml/libc-help/2019-12/msg00014.html > --- > .../unix/sysv/linux/aarch64/gettimeofday.c | 4 -- > sysdeps/unix/sysv/linux/clock_getres.c | 36 +++++++++++------- > sysdeps/unix/sysv/linux/clock_gettime.c | 38 +++++++++++-------- > sysdeps/unix/sysv/linux/getcpu.c | 9 +---- > .../unix/sysv/linux/powerpc/gettimeofday.c | 4 -- > sysdeps/unix/sysv/linux/powerpc/time.c | 4 -- > sysdeps/unix/sysv/linux/sched_getcpu.c | 15 +++----- > sysdeps/unix/sysv/linux/sysdep-vdso.h | 34 +---------------- > sysdeps/unix/sysv/linux/x86/gettimeofday.c | 4 -- > sysdeps/unix/sysv/linux/x86/time.c | 8 ++-- > 10 files changed, 58 insertions(+), 98 deletions(-) > The change looks OK with the above nits. Reviewed-by: Siddhesh Poyarekar