From patchwork Wed Sep 4 16:17:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1980935 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=SpXw8El1; 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 4WzSQ70Hgwz1yg3 for ; Thu, 5 Sep 2024 02:20:15 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDFAB3860C3B for ; Wed, 4 Sep 2024 16:20:12 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 2F295385C6C3 for ; Wed, 4 Sep 2024 16:19:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F295385C6C3 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 2F295385C6C3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1029 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725466795; cv=none; b=Ed4azzAETbve2/ej2vjKbpe8b/bcy4e9InSLWuj/VcU1riC5oBZYCYcBXnVHh826pdkRJag1/jJQ1ztllWm1+rBYmID45UmmZXO+DArQJ1ASXZINF19m0gqWMbp2VDWrmdm3PnpnVDO3eK66+yvIXGWt1OxezhReDgvuUloF1G8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725466795; c=relaxed/simple; bh=Q4v1FZIjuaW+7YbodSBcyW+78zvv/iaV8dfgKj9WV8A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IYoADKGFtpB7ypA1weD18LKnrnToAyh5+P9x3dSdgyTPJ6SS5CEVislkkGO5ekZgaQkX7OkrtraQZit9pPVTrzhvq+bWJRJjBGdQeR4gnf6pyIZ58QUX1oeCR5OC/oBlSLmdOiybPMNrOPlF58rWkBKuqZcKnvVSghid/Ku3vDs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2d88edf1340so2956821a91.1 for ; Wed, 04 Sep 2024 09:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725466791; x=1726071591; 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=5TCl/6sqBfAQSxMWtnC3J+f9OtJaLYfORFwMoKOWu5A=; b=SpXw8El1HgmZomYge7X9CeqWEm4yxbZ54/Kp3DnLz9rDJURnuiYWUCBB4DinrM7vkx YPHeyhvUE5NItw5+uQZkKg8LBZrChMMF24GcRYe7VqW2bZVikBOTqzkyAfsQKMPSGb/G 3KUSTtxZIpALGafGY8yKy2oqXYvfWZv8xn3CiJ3rJ7z9qBvR+xM5jaQyg9reO7CAbIFj K9sKUuoW/jtuGMBxXRhtDhww7CVz826AeUNuoTJxfeFS8sytR/7do/rOe6e1mZ7YFErv 9CPwq4fUhtqgnAwiss9ExEuhZaG0iMVh9tlW2caFpmGKcRWvtP8thuXc+5w4jDo/W/rx r2cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725466791; x=1726071591; 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=5TCl/6sqBfAQSxMWtnC3J+f9OtJaLYfORFwMoKOWu5A=; b=j76nQYfvLVcpuGR0dBHb3CzGAPkUyKkmgOnMgRn4PxGq+PWq5Xn8k7XBT6kjRjuYLn fmJkC8udbnn8hWYDXumzC/iLb3z2o3CO6WTeMdwS4DzlSPwT4iYLfTyqg2eb5jmQrpDQ sF1oMc/7DFJ2Gzsm2nRaQ+jKmVqftKPc624oAwa/2kPezTGj6T+5ImlXitxNW2vpfSpS wiLojtwpzBq6h9A0vOlukO1ORg5akMiPF9KUR27KlgoLiMBfqyPyiZdmr/tnyKlkAqMs nfjXRMvKBo/OH0NDNnvW8Q9xPKiTgRLWMXof+hqjEdNXu2dYD9hXdEetPqSp8ElsamKh R+ag== X-Gm-Message-State: AOJu0YyOkwAy3oQo4XNhl+GfysFrtbIDX5ouKGjclHuu8XFl4yrMrO5L r/Wpi2VWVHbaqIq8Lp3/9XoXgsGyisRwClyhOeUFKZ805129Ia9JKKrziIACTfuAPGavRbyo092 VyS0= X-Google-Smtp-Source: AGHT+IEpPsORNA4rwz0Uom+Z8Qpo+QuqlGvnYS7MuFfs5vCR8uSGZYCH7YoGDXakULm/vepqwdmu0g== X-Received: by 2002:a17:90a:3d4b:b0:2d8:6bfe:2bb4 with SMTP id 98e67ed59e1d1-2da5597d530mr8621606a91.23.1725466790640; Wed, 04 Sep 2024 09:19:50 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:e912:1301:81fd:2901:4eab]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d8b2725332sm8096914a91.34.2024.09.04.09.19.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 09:19:50 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] linux: Use GLRO(dl_vdso_gettimeofday) on gettimeofday Date: Wed, 4 Sep 2024 13:17:02 -0300 Message-ID: <20240904161947.821553-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 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 gettimeofday for architectures that define USE_IFUNC_GETTIMEOFDAY. 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. --- sysdeps/unix/sysv/linux/gettimeofday.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/gettimeofday.c b/sysdeps/unix/sysv/linux/gettimeofday.c index 7ab147c614..94cc433202 100644 --- a/sysdeps/unix/sysv/linux/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/gettimeofday.c @@ -36,12 +36,10 @@ __gettimeofday_syscall (struct timeval *restrict tv, void *restrict tz) return INLINE_SYSCALL_CALL (gettimeofday, tv, tz); } -# undef INIT_ARCH -# define INIT_ARCH() \ - void *vdso_gettimeofday = dl_vdso_vsym (HAVE_GETTIMEOFDAY_VSYSCALL) libc_ifunc (__gettimeofday, - vdso_gettimeofday ? VDSO_IFUNC_RET (vdso_gettimeofday) - : (void *) __gettimeofday_syscall) + GLRO(dl_vdso_gettimeofday) != NULL + ? VDSO_IFUNC_RET (GLRO(dl_vdso_gettimeofday)) + : (void *) __gettimeofday_syscall) # else int