Re: [PATCH 1/2] vdso: sparc: stub out custom vdso implementation

From: Thomas Weißschuh
Date: Wed Jul 23 2025 - 06:57:38 EST


On Mon, Jul 07, 2025 at 04:46:37PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> 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
>
> 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@xxxxxxxx>

FYI I have a series prepared that will move SPARC to the generic vDSO and also
addresses the problems listed above and mentioned by tglx.

I'll send it after the merge window.

(...)


Thomas