From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380105; b=qxOvogIeuG9u0VNK4lTeFrxarRZL1mlr+pMYD4j6k8P8itg07MI0Wf9PTDqdNcBQlW0M ClsA+EOLw/AH+eampAJM80EYQe+YbA12JPbsV18tq8/+naubN6Z/QLua+lGt85yvRRLUv CQVMk2+jLTIhoIcfrR0FsJ3QiE0CmCjm1ZQwjWj+LwxofXalE3EWwIO1bIwkGHL9BmpGR G8l6wf82y2HI4EwoSJBWpqhOQ88TPOpvoSXuvnFP8cAEfcPy8iujTTpTW/MNNRI7K+QP0 rCrovldCcvbXnd+ttTYyCF4ee+o/mMWa1j1DLieSzp50mqFdjhSwkgBBXToGKRRP/CA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380105; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=QM44hBicAR+v5JbpMFl1pCsFDD8oesK2FTR+lG4xIHQ=; b=iQewrHtksk8MRbxf7leGo3DGc+ir0C1lfGMSK8PS0BhQmwRZeJmxdNxnXl3vz6MY78p6 itii/zkumA6MK5hnodKmraAQs+DDqxj/7+b0EXMveQZZ82RxUnTovFFhb6H/cJ1/pyVcp V+ooKPoDkruwC9wAX291X9Lt1kze1F64H7lnIV/Qmx9Fle6I7lJjMLaCHhK0weQb+gAe2 Fl/LX0+iGKY7cWMd9Kt/C+HImyJnNh+QJVB2IIudoo2AmCjVZdkQi/I1thz8z8y8HhjWr 3ECgcHWjeOH/MLeC3vU5QTLQ1iyvD1NT2TvEmyppIm4uYXP/0VUJ7zZh8y5EhEmIN4w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IAp4akAQ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B2CB606A322; Fri, 4 Dec 2026 10:28:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IAp4akAQ 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-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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) >