[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250708073204-b67226e4-b140-4a1a-ae98-47769c1b2f98@linutronix.de>
Date: Tue, 8 Jul 2025 07:39:06 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
"David S. Miller" <davem@...emloft.net>, Andreas Larsson <andreas@...sler.com>,
Andy Lutomirski <luto@...nel.org>, Vincenzo Frascino <vincenzo.frascino@....com>,
shuah <shuah@...nel.org>, Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>, John Stultz <jstultz@...gle.com>,
Stephen Boyd <sboyd@...nel.org>, Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Eric Biggers <ebiggers@...gle.com>, sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] vdso: sparc: stub out custom vdso implementation
On Mon, Jul 07, 2025 at 04:46:37PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> sparc64 is the only remaining architecture that has its own implementation
> of the vdso clock_gettime/gettimeofday helpers in place of the generic
> code. This causes a number of issues:
>
> - Changes to the vdso interfaces require adding sparc64 specific hacks
> even when nothing else needs them
>
> - The prototypes in <vdso/gettime.h> don't match the function implementation,
> and not including that header to avoid the build error from that causes
> another warning:
>
> arch/sparc/vdso/vclock_gettime.c:274:1: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes]
> 274 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
> | ^~~~~~~~~~~~~~~~~~~~
>
> - Nobody has ever implemented the clock_gettime64() vdso that is required for
> 32-bit compat tasks
>
> - The warning about the missing executable-stack flag was missed:
>
> sparc-linux-ld: warning: arch/sparc/vdso/vdso-note.o: missing .note.GNU-stack section implies executable stack
> sparc-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
IMO this should be in its own patch.
> Most of the removed code only exists on sparc in order to dynamically
> patch the vdso based on the presence of the tick vs vtick based
> clocksource.
>
> Rip out the whole thing and replace it with a minimal stub as we do
> on parisc and uml. This introduces a small performance regression when
> using a libc that is aware of the vdso (glibc-2.29 or higher).
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Thanks, this makes things easier.
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Tested-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
But why do we even need the stubs? Removing the time functions from the
vDSO completely should also work, no?
For parisc there was no reasoning why stubs were used. On uml the stubs are
necessary to prevent the libc from calling into the host vsyscall [0], but
that looks irrelevant for SPARC.
[0] f1c2bb8b9964 ("um: implement a x86_64 vDSO")
Powered by blists - more mailing lists