[PATCH] powerpc/vdso: Flag VDSO64 entry points as functions

Segher Boessenkool segher at kernel.crashing.org
Fri Oct 11 05:36:42 AEDT 2024


On Thu, Oct 10, 2024 at 12:17:57AM +0200, Christophe Leroy wrote:
> On powerpc64 as shown below by readelf, vDSO functions symbols have
> type NOTYPE.

> To overcome that, commit ba83b3239e65 ("selftests: vDSO: fix vDSO
> symbols lookup for powerpc64") was applied to have selftests also
> look for NOTYPE symbols, but the correct fix should be to flag VDSO
> entry points as functions.

> For ABI v2, there is no function descriptors and VDSO functions can
> safely have function type.
> 
> So lets flag VDSO entry points as functions and revert the
> selftest change.

> diff --git a/arch/powerpc/include/asm/vdso.h b/arch/powerpc/include/asm/vdso.h
> index 7650b6ce14c8..8d972bc98b55 100644
> --- a/arch/powerpc/include/asm/vdso.h
> +++ b/arch/powerpc/include/asm/vdso.h
> @@ -25,6 +25,7 @@ int vdso_getcpu_init(void);
>  #ifdef __VDSO64__
>  #define V_FUNCTION_BEGIN(name)		\
>  	.globl name;			\
> +	.type name, at function; 		\
>  	name:				\
>  
>  #define V_FUNCTION_END(name)		\

Ha cool!  Excellent.  Thank you :-)

Reviewed-By: Segher Boessenkool <segher at kernel.crashing.org>


Segher


More information about the Linuxppc-dev mailing list