From patchwork Wed Sep 4 16:20: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: 1980936 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=DEQ060xA; 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 4WzSQR1CXGz1yg3 for ; Thu, 5 Sep 2024 02:20:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 02620385E82A for ; Wed, 4 Sep 2024 16:20:29 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 4DB6E385C6C3 for ; Wed, 4 Sep 2024 16:20:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DB6E385C6C3 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 4DB6E385C6C3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725466811; cv=none; b=Job6Fii59WpooU6af6zOr98SBPKnKv207zmX9txgqdCRy4FyN9FT9Su+GnDeVqyAv0gkkJF7GlVRk4NJZIpMSbAlcX8giOPxeai996h4M3vHA0+VG71f3YM/1K3GuPJD23s8FKAIOCbZ/Pf4ht9idPrCZMEYyT54mvlJV6+PnbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725466811; c=relaxed/simple; bh=8/m8LJkmUKJqz4g1jDWgB3vHQ5VkGDi6Dz5j2BRnuUc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wfKRaUKWDFO0PLOFlS2QCws+roscco0IgdbOfw0RBsGIRx4drAFwsmOoqEYy0TJMS8y+whKTCDOrYlNj4TvrBI35k5MGojqVGUbhiU9Uhpz/fZ+9coZrQuVa9AzkaeUrTXkS8ExPw3+0S5Nw3zhFPiQ4X6xMs4m7qqe3AWiCReE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-7176645e501so2354100b3a.1 for ; Wed, 04 Sep 2024 09:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725466808; x=1726071608; 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=WCUbGh0QrmWVlEUWZfNpuDT2CaWTmsiE7s6ZHJpRjCY=; b=DEQ060xAtqN3YpBNTWZP+ds6cFJULmUPVmygw/GyckAhVpbR2Dm5sUelsvyA+URckc byCTwg/2kSGxDfwpRmddsSL0u//mldJXwE1+Ag6MfaVUKtsv3N6N9mMJBxD7gZV0IGBb TQkNDkPFE/RfBOkGm5dGcWNTXNtI0GNZp3mlJaPoO/+mJLDdd1R008SpQBmqtOWQQQKF bZ8XZdnImFAaH32GwvLn5kkuG24eCyHY7goSDczQo+/loLaq57L7Ps1Umks4kmZc4FKr WGcKFqdpcU63oNsLxNrZMJvkHgz4XsKTW78tHu4E0bt1aHTWqwa1ROHsZvcdfeH4F6bC bOtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725466808; x=1726071608; 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=WCUbGh0QrmWVlEUWZfNpuDT2CaWTmsiE7s6ZHJpRjCY=; b=Azf2kRIQv9QEnrkt78tN18M9bpiRcl8RxvHbu7szYFoW6OOY0Vn2IkQDePpaUBaq4w ljZvN+rI+tCoNplqLJo/T0F7LXfZKuUCtruzlzWOGS9wF42u1wAxyP93hnptGsOtAaJw mQY1Iq0VXrJDVO+EkdRAetD8rdHjH3B9EEuG8Q+90NLBpCzJE8FL2z/c/EG/rtKOF7wZ ykpW5zAnmwpO+ufMxbbJKehDKA+Du3HfqpyS4o81Inr6SU5+8J3yOwUS3Mfo3DKk1veV 6g89g8L9f3nNftjB0FdYgtrgvjMBMCeMlkc/K5/TFSYmBxggM0TP4lBtVuPLlndvSD1T TnMA== X-Gm-Message-State: AOJu0Yzi6mxswxEK8/GQhAUhbHUhHoVsackqqdDD7Q2whoHkjpFRQT/O oOzCG8UDJb4OLLl7RGJUYyo7VcXHY/8FL1mQE9/uUSZRFRfMvpUpWaZ9bXKL+rUswEbky9O5fy6 mPxg= X-Google-Smtp-Source: AGHT+IFPcoENLLfYsh6Yt3lKYIAgbK+Jm+kUX0+2FDysKalN52VVYeRkFZCV6iCDyzyZLWpud3KjXg== X-Received: by 2002:a05:6a00:4616:b0:706:6af8:e088 with SMTP id d2e1a72fcca58-71744331059mr11946698b3a.3.1725466807838; Wed, 04 Sep 2024 09:20:07 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:e912:1301:81fd:2901:4eab]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d4fbda8762sm1820286a12.69.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:07 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] linux: Use GLRO(dl_vdso_time) on time Date: Wed, 4 Sep 2024 13:20:02 -0300 Message-ID: <20240904162003.821668-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 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. --- sysdeps/unix/sysv/linux/time.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/time.c b/sysdeps/unix/sysv/linux/time.c index f8b0cee41c..ea929f6758 100644 --- a/sysdeps/unix/sysv/linux/time.c +++ b/sysdeps/unix/sysv/linux/time.c @@ -32,12 +32,9 @@ 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); 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