From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC890606A32C for ; Fri, 4 Dec 2026 10:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WV/Qt2WR; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IAp4akAQ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=QM44hBicAR+v5JbpMFl1pCsFDD8oesK2FTR+lG4xIHQ=; b=WV/Qt2WRGx7XUL 59iSSVCYn7m9q3b8IRTguoDNm+hvKve6u42apfwNfAn0K8MEZ9lxiQykgguVg/x43PW0cOK+BUNlN VE31QwFxNw8rcuUIKJBFTTcymRegpcxnol/JJMfEuuojowCyqSDPq5bwoCrfmIfAk1JJddyaQOGJL l1D2wqDL8N4Ma6exvHR4xMAkN3GSvykpZ4UgYD0JP7xFgILjyZALlY8iRh+kThj6uNlPmsRQypwZ9 QOmQM5hQmUYGEBq1ANVWhtwjaNbKUvRLh8NGg/NM7UpaPx9ge05T+dlU8BkDDMdgrR6ITS4QIs5K0 fNJPS/wT50TxAxHm4asA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZQWt-0000000HXUp-04uT; Fri, 04 Dec 2026 10:28:39 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZQWg-0000000HXLc-0KIv; Fri, 04 Dec 2026 10:28:29 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 3F60C62C69; Fri, 4 Dec 2026 10:28:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82EE81F000C2; Fri, 4 Dec 2026 10:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796380105; bh=QM44hBicAR+v5JbpMFl1pCsFDD8oesK2FTR+lG4xIHQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=IAp4akAQJj1wCvUXHTx35VdTzp9CfpFff57dvqO/0hD3u7RANh3yPnUQV5WI247nv dqc9fQ++ePLkhX5aLQkM3f+sScnCzs+30991yzR8M+svH4y8lN51ZUkFnD7k2Q5DcI VShpn3/AzZBtHDxn7mG5w0f6+hb7Z5coBhU/zmhhnH3WMHv+trbfTad9QXiZ4eR2lw 0K5ufvqWLbqMBTxko7+W/b2tJkeWzKZs4f2Daopwe2uKZwS+bKfSdqLp4Yomk35olh x68h9+e9effXU96og0SRAVVLzGxqNCJ++84HeNx6oVqjJKxfTu8W+G+8U/dlKGpjxe KWlXAMWuKljZA== Message-ID: Date: Fri, 4 Dec 2026 11:28:19 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/9] powerpc/vdso: Directly include the generic vDSO implementations To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Thomas Gleixner , Andy Lutomirski , Vincenzo Frascino Cc: linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org References: <20261204-vdso-generic-include-v1-0-8f4ed31bfbbd@linutronix.de> <20261204-vdso-generic-include-v1-5-8f4ed31bfbbd@linutronix.de> Content-Language: fr-FR From: "Christophe Leroy (CS GROUP)" In-Reply-To: <20261204-vdso-generic-include-v1-5-8f4ed31bfbbd@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-17.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Le 04/12/2026 à 08:30, Thomas Weißschuh a écrit : > The inclusion of the generic vDSO implementation through compiler > arguments is complicated and non-obvious. > > Directly include the .c files instead. > > Signed-off-by: Thomas Weißschuh > --- > arch/powerpc/kernel/vdso/Makefile | 10 +--------- > arch/powerpc/kernel/vdso/vgetrandom.c | 2 ++ > arch/powerpc/kernel/vdso/vgettimeofday.c | 2 ++ > 3 files changed, 5 insertions(+), 9 deletions(-) > > diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile > index 0d1a49529885..386eb3778934 100644 > --- a/arch/powerpc/kernel/vdso/Makefile > +++ b/arch/powerpc/kernel/vdso/Makefile > @@ -11,19 +11,11 @@ obj-vdso64 = sigtramp64-64.o gettimeofday-64.o datapage-64.o cacheflush-64.o not > obj-vdso32 += getrandom-32.o vgetrandom-chacha-32.o > obj-vdso64 += getrandom-64.o vgetrandom-chacha-64.o > > -ifneq ($(c-gettimeofday-y),) > - CFLAGS_vgettimeofday-32.o += -include $(c-gettimeofday-y) > # Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code. That used to be true > # by accident when the VDSO was hand-written asm code, but may not be now that the VDSO is > # compiler generated. To avoid breaking Go tell GCC not to use r30. Impact on code > # generation is minimal, it will just use r29 instead. > - CFLAGS_vgettimeofday-64.o += -include $(c-gettimeofday-y) $(call cc-option, -ffixed-r30) > -endif > - > -ifneq ($(c-getrandom-y),) > - CFLAGS_vgetrandom-32.o += -include $(c-getrandom-y) > - CFLAGS_vgetrandom-64.o += -include $(c-getrandom-y) > -endif > +CFLAGS_vgettimeofday-64.o += $(call cc-option, -ffixed-r30) Maybe it is time to get rid of this fixed r30 workaround ? It was introduced in July 2021 by commit a88603f4b92e ("powerpc/vdso: Don't use r30 to avoid breaking Go lang") But go 1.15 has been obsoleted in August 2021. Allthought the comment gives the impression to go 1.16 is ok, it is only from go 1.16.7 that the problem is fixed. However go 1.17 onwoards are fixed, and go 1.16 was obsoleted by mi march 2022. > > # Build rules > > diff --git a/arch/powerpc/kernel/vdso/vgetrandom.c b/arch/powerpc/kernel/vdso/vgetrandom.c > index cc79b960a541..e164e2052615 100644 > --- a/arch/powerpc/kernel/vdso/vgetrandom.c > +++ b/arch/powerpc/kernel/vdso/vgetrandom.c > @@ -7,6 +7,8 @@ > #include > #include > > +#include "../../../../lib/vdso/getrandom.c" > + > ssize_t __c_kernel_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, > size_t opaque_len) > { > diff --git a/arch/powerpc/kernel/vdso/vgettimeofday.c b/arch/powerpc/kernel/vdso/vgettimeofday.c > index 4b712fb01a3f..11a69411e04a 100644 > --- a/arch/powerpc/kernel/vdso/vgettimeofday.c > +++ b/arch/powerpc/kernel/vdso/vgettimeofday.c > @@ -5,6 +5,8 @@ > #include > #include > > +#include "../../../../lib/vdso/gettimeofday.c" > + > #ifdef __powerpc64__ > int __c_kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts, > const struct vdso_time_data *vd) >