From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-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-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= 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, 02 Jan 2020 12:07:00 -0000 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 X-SW-Source: 2020-01/txt/msg00011.txt.bz2 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