From patchwork Thu Sep 5 13:49:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 1981284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=XsD6ue1p; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X01225BQXz1yXY for ; Thu, 5 Sep 2024 23:49:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B5A2E3865C24 for ; Thu, 5 Sep 2024 13:49:42 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 9C96C385843B for ; Thu, 5 Sep 2024 13:49:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C96C385843B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9C96C385843B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::435 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725544168; cv=none; b=swHIik8mfdJP4sezXPhjPkP4VGJnrkcPBHzCnf65PBa1EhP4QMGqgU7cTg3UHkm88/HYDNhw+qXo//obHJjndz7AriAUZw+6uytUmRGqhATlK6TQ7Y7siBs35Pxk9+04KoT5gPEBBKWalmNzi91/DK17XLQfZ6LmJi543rt9y8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725544168; c=relaxed/simple; bh=V6tXTU4TxCpf65AXolrKwdJJidI6ABNd745ho+CUMhQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=FVeVAUZxF/FSyd/VPLPhq2EqPKMcJotpCjdgnW4Llbyrwa2B96YAG+cYk8awUJ+WzUSJ1nVFYWW2kI6YnkvsheqGwAhIQxLQzzZAI1rVIf+PEAxQ+WhkdJkZNDlFUIW66svAYkzFO/kXg3wOBXkXQwuSdgHVFCdfV47OK7VtThM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-374ca7a10d4so507736f8f.3 for ; Thu, 05 Sep 2024 06:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725544165; x=1726148965; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=soaQrEl0728Wvgj/gVHYMQr776iqr04XHGPMvMLJOjo=; b=XsD6ue1pa5LOChBTX4fyer/+EKXsaxDqEjwbRG066D1Gh4tBw5+lHLCJB3bCkAnxJR 2tbrxguwGNwulk+Sptwh4IZuyPOi2ohokaoZY5Dut3Y8YfNwYSdNpW/k/R9cphkGu9mr PMWBdyMq1eJDxGeaH/8hvgosq1D0KJHjQCaw4gMy/976pFYaOPutDVG9eTxNQwWXrAK6 Oh4fvqZUnhyHgRN+/3dUo8UjvJfekpvQuOYlgFpT/SLxky6797Gco/epO9pL2y+p3WAG sHibzcpWOhwJutu+HGzEE/jx3uwl4wOPM2EewzTRfwRL2qf+0YvjiS53HcC2/jSv9rsD /rwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725544165; x=1726148965; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=soaQrEl0728Wvgj/gVHYMQr776iqr04XHGPMvMLJOjo=; b=WQ9UoEL6kpdwa69nj3Y46ZN7pxETHOtTRMbFhU8VbS60rnhHC97vV/WtC7RoFCBN2V uYJOfzMyl6UJ1lUB7XR+GlpwK/Wamkx7/Hy3wguJzG9XBKzBIgzQmfLygCTE8kxU19B+ KYP0fUQ8CcuLEFRQ96s0oIwbmKIVrb4NlrwStlbdheAC/Y/PTvpTq9S8I4+Tcfp42YC7 lBkAeT8rtf9nz0QbI3Y7bAle8rUqBmPAUAVipcQEm/UXCcftSg0niIjQuzVBtqV1PHsV 1sRyRXJNoNuj3OzDqYHznOAxcChg4csSHS01hVm11rnx5E3B2k4OeuuEXTd0fStXzJcf zOGw== X-Gm-Message-State: AOJu0YyRm2K7OyJNExifoDR6MQsp+4Y2iNG/OE5RgNLmka/n1YzWsEE3 aagkWB8khbhJ+ex9pSz93+pNMf8odyJNa+MPDshhaou19RafyV/9Cfyg5up35gGrrxcgvQ2NsQw 2/1c= X-Google-Smtp-Source: AGHT+IGAZy5OVw5ZR31xQ5IeypQ0LB4eO7JhYsoCG+UwRTgp4G4KrNnDf6qGdk5tUaKchyngMSEEoA== X-Received: by 2002:a5d:4046:0:b0:374:cb62:b6f1 with SMTP id ffacd0b85a97d-374cb62b83cmr9189838f8f.15.1725544164603; Thu, 05 Sep 2024 06:49:24 -0700 (PDT) Received: from ubuntu-vm.. (51-148-40-55.dsl.zen.co.uk. [51.148.40.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374b34725desm16711528f8f.81.2024.09.05.06.49.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 06:49:23 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2] linux: Use GLRO(dl_vdso_time) on time Date: Thu, 5 Sep 2024 13:49:13 +0000 Message-ID: <20240905134922.2463750-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org The BZ#24967 fix (1bdda52fe92fd01b424c) missed the time for architectures that define 1bdda52fe92fd01b424c. Although it is not an issue, since there is no pointer mangling, there is also no need to call dl_vdso_vsym since the vDSO setup was already done by the loader. Checked on x86_64-linux-gnu and i686-linux-gnu. --- Change from v1: * Fixed build on some architectures due a missing INIT_ARCH. --- sysdeps/unix/sysv/linux/time.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/time.c b/sysdeps/unix/sysv/linux/time.c index f8b0cee41c..50854e05e2 100644 --- a/sysdeps/unix/sysv/linux/time.c +++ b/sysdeps/unix/sysv/linux/time.c @@ -32,12 +32,10 @@ time_syscall (time_t *t) return INLINE_SYSCALL_CALL (time, t); } -# undef INIT_ARCH -# define INIT_ARCH() \ - void *vdso_time = dl_vdso_vsym (HAVE_TIME_VSYSCALL); +# define INIT_ARCH() libc_ifunc (time, - vdso_time ? VDSO_IFUNC_RET (vdso_time) - : (void *) time_syscall); + GLRO(dl_vdso_time) != NULL ? VDSO_IFUNC_RET (GLRO(dl_vdso_time)) + : (void *) time_syscall); # else time_t