From patchwork Thu Sep 5 13:49:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 825658 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp310580wrb; Thu, 5 Sep 2024 06:50:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXo+sLiVgjoarwmd/rVXm7Mg7QMs2BSOB+YiSHdTNesa17GxUtIA3AZDbAOXO8/RXA9wA8EUQ==@linaro.org X-Google-Smtp-Source: AGHT+IGPdo3Wphy73RL1XXLCz8eeU1lxq3PR5kRHlPSp6p0eHGe/zo1idg2sE4Ux7KnaEQ+c2rqH X-Received: by 2002:a05:6871:6a8:b0:26f:ddfa:3571 with SMTP id 586e51a60fabf-277fffc1872mr14876152fac.2.1725544225992; Thu, 05 Sep 2024 06:50:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725544225; cv=pass; d=google.com; s=arc-20240605; b=LLuKS3fJHXjwzMVp8lIg5yMq3t6e/+ECZg91V2IRLPWyRHuzn9YVqWbghb8p+AkPtB bjhTlkTVJrHm2FdcD0fXdxfeGulbbGbtFDZ9mb830g88101BazxsmRKrOxir4RTDO01r K27umASlbCJ8YqD74wKhixLRMQxVQQvgy60PZLXvGMvtpfFn1w5LQgeh5+hUykdYl0rF vipwt9Ok04ZuUoDxk3t3gn4p0jnNNCuhd5oUIYgcjK6KWypVul/RJ1PY+27h9jclDerx j1nqBzVv3cngQiz3l15TWeMttzNmFZeN/yqdINgkRjnTBsj/aFIpxr7YOv+NHzQsWSfr 9g5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=ajJFOR8b5Hr5EC/YB0K5ZWSRS4gBdE3ClAWdY5kzIfU=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=bpZsI5jUn4qx7MfACWAtW5X280dAS3VQd/D+TQUyDWsUrtLRWFXGfasOkDnGRho+b3 eu+h6c+XtX9doSAdaAiNH4uVjN5yM4dETYIE8JN2rcblFHiAH/kkc3dg/VavtsFNc8gP b5bvSfjsSr14tGbsGw+NCDphGm3ACFMBldrEjLw8erV7fdd+++3YzZfGAelaPdPaQTXG Dvjr2y0jnB24NkjxgLcnNphKtYd5qdLN/gV4woW01+/YpiErDQxAPX9ZUNl39KbUGb+b D3iks/FEpM5Ib05PxN1qSa39xj9BLMOLiM1+jbmK5agaw23HEU0uuemNidv/Lv9Cw2tn US3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ER3ddr+p; 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 af79cd13be357-7a98f03bcdbsi191588885a.711.2024.09.05.06.50.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 06:50:25 -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=ER3ddr+p; 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 90E893865C29 for ; Thu, 5 Sep 2024 13:50:25 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 86B243865C22 for ; Thu, 5 Sep 2024 13:49:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 86B243865C22 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 86B243865C22 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725544192; cv=none; b=O0+gzgUHQXMk6gYjlXClpOg8etKiPn8krsbnqb68H7eexdcLMiMGOicqYz42o8BaO+bofJzsi4Cp04K7Pg6UJj/oA0vbv5nZvX3AC5fCpkKukxvk7sSCeOHLyblI8IQ8wJjvsMDNjNklkqcYiGVsPOySA8rvTba0MIq2RCTuWpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725544192; c=relaxed/simple; bh=df2rlalOFo9Sjset8cNQoL3agQ+DmkCGA+ZKXjAlelE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L1hUv3BMP1xFzok4s7BAEMNpTeZNyabcbFrUrMUg7oy+CyapQ/c0eH9qWg6puNp2ujrQDY6k5/zGsB/r5vYVr5NFJRDG0Tls8mJOY+R2pAmeZ6u69wX59nTUrwevKC/1N6LU7EEm7km9OtvMUvTeKZVbKufBEGRwPvwF7GbdzJs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-428e0d18666so6522635e9.3 for ; Thu, 05 Sep 2024 06:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725544188; x=1726148988; 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=ajJFOR8b5Hr5EC/YB0K5ZWSRS4gBdE3ClAWdY5kzIfU=; b=ER3ddr+p/qN/Av6bHTRwRh+Ia5vZqn4SMj/91S0QmOPwUdmdY9uC3+mc5NMZTmy6ox ifV03CHCDSaxWULoZKPbLFap00PcerPTwNinxBTttKYaAOpcjJQnYROODb3AWcet1ZBf RFgcINmmF30Najnq3PmMO6GYwEhT0GgYXNs1Il+c6bxmfHNRc9mdqFy+APabtlVLklgh Gm/acU1WRLrsxex69atB26lEdOvI4AhNBrUm/HV87+A2RjcCqEZqhfHfR8feDz8l1XrU VKF4M5+sbAtBpXCZxO/9iUPcLpuU5KTtuzUXZwuDDPrZ7Zmb9OzcTDeigqqRgbkPnhil XFdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725544188; x=1726148988; 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=ajJFOR8b5Hr5EC/YB0K5ZWSRS4gBdE3ClAWdY5kzIfU=; b=eGIllmUVbAwR+4CUWSWglnRGDCS4KLzMBaxqYVmLWP3J7EOS8whlodEPFyjixW1Q6e tTlZzRSB4ohn/HPg36MsO2KJkhqEjDV+gAjkr3U0/QCLfoDSERDNU7rWoKardZQYuQtB P5LW/2/G7cG5vrFultfA8AuQGjEl6Z7/rwpRutr9hnhmikbMQJUL5N3U/r8yunzG4UDO 3XE9ZJ1yj+j6Hylue9DdWQEzFFwTF2YZvx63XLnXzz2A+iDDhrjZg4hABpSc/nJ58pq3 d1wfdNzT6LyfA1fzlfOBuwEZMqhhzzNao082bwGavpk1W0xZ0TSYqQXuuz3ujFRpqBE7 QZ5g== X-Gm-Message-State: AOJu0YxsT+gs1xIP5lTyFdBOuujstt1buSU64aOcqZibbKbaoigcx8xh NwCeuJ7IYdGtt7+H7k38YbIrjO97G9fvfXqykZzxgdoT84hVsY3a7MNq9qyAEME9q2AyiU5RIcC LvASS/w== X-Received: by 2002:a05:600c:138e:b0:428:c0a:27ea with SMTP id 5b1f17b1804b1-42bbb205ac6mr152147535e9.12.1725544187460; Thu, 05 Sep 2024 06:49:47 -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 5b1f17b1804b1-42bb6df795asm233621585e9.21.2024.09.05.06.49.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 06:49:46 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v2] linux: Use GLRO(dl_vdso_gettimeofday) on gettimeofday Date: Thu, 5 Sep 2024 13:49:36 +0000 Message-ID: <20240905134942.2463850-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~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. --- Change from v1: * Fixed build on some architectures due a missing INIT_ARCH. --- sysdeps/unix/sysv/linux/gettimeofday.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/gettimeofday.c b/sysdeps/unix/sysv/linux/gettimeofday.c index 7ab147c614..afee658e7b 100644 --- a/sysdeps/unix/sysv/linux/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/gettimeofday.c @@ -36,12 +36,11 @@ __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) +# define INIT_ARCH() 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