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

From
Segher Boessenkool <hidden>
Date
2024-10-10 19:13:08
Also in
lkml
Reply to
Christophe Leroy, 2024-10-09
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.
quoted hunk ↗ jump to hunk
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,@function; 		\
 	name:				\
 
 #define V_FUNCTION_END(name)		\
Ha cool!  Excellent.  Thank you :-)

Reviewed-By: Segher Boessenkool <redacted>


Segher
Thread (3 messages) 3 messages, 3 authors, last reply 2024-11-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help