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: 825335 Delivered-To: patch@linaro.org Received: by 2002:adf:e246:0:b0:367:895a:4699 with SMTP id bl6csp254980wrb; Wed, 4 Sep 2024 09:20:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyc8U/pfkzSEAKsZQMr/bIU90EPZqaE6J7RIBxdCWjC1Lte/rtx8Y8gTwa+ZajlEzPr1a6Mw==@linaro.org X-Google-Smtp-Source: AGHT+IFNrhKCnflkjtuhzQ8vNGyrkCltEWwr9vnZ4IRXciZlTQ1FvaahcWpFw9xcxfSwq/3UPJAH X-Received: by 2002:a05:6214:2c08:b0:6b7:4712:c878 with SMTP id 6a1803df08f44-6c3ca78933amr85984056d6.41.1725466806269; Wed, 04 Sep 2024 09:20:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725466806; cv=pass; d=google.com; s=arc-20160816; b=jGXZxzRlkeMTsDtG2nXolCcmtvbV0EEydmDjBR1wZ/AYxj7VOxNEk3cfR95Dt/GQ4/ gHrbf3Ikz4LGIS6xNHz4ISZU+AkBYfDwkXOzkuaprRT7ZyLKD30B/Mm/RhPm2tZdS9yv +VLlzmEfxrbh8G33ZC865pP7jwrVmO1OV1v/eZwAnfya4Q20gMDUuJQO5rJ0AD55wuCG igfZzKsbsRSQvTgvSk4Ahcaj7MILwW1WE0zjMff5EeoqWgNCkrDv7dWSqRLLcUJgOoV8 8gJfsWihWSvin50erkLZIoIhKqkD86vCxjlrXg599NfwhVFCURunF0pY7LuXeCHjH4GU wQGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=5TCl/6sqBfAQSxMWtnC3J+f9OtJaLYfORFwMoKOWu5A=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=w3oSGIxArV3pP+aPeDfVsXBHbbyUPH5jPZqGGf+ZRXtpklAJDvjBtazzRiVr15Y8cw YJOSdumNNtkciMFndjdmitXL+dbl/WuCFuhkXgpGUwZkHT5YnHnxKBYnwTwxEuvIoJzs gA++AC/kK6ZHntvvozNJW8txfWUaDDRPV77l3aIpZikQvuZog8Mb88k0yWogGuy0lZSM mT1mFgHsxeUIEPAyBCdG/cfpPdAvxg2cGE8fNpOorNKIIk+HoLFe7VbZ18axBxL3Za8/ cQ6eafz1n9apkzH9EPii17bUzTXXIQrx4ORq48/lPx4sPOm0F3plAeNnEx2jQRCW7s0H kjtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SpXw8El1; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6c517700974si12704996d6.5.2024.09.04.09.20.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 09:20:06 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SpXw8El1; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C47AA386103D for ; Wed, 4 Sep 2024 16:20:05 +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-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~patch=linaro.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