Skip to contentSkip to conversation

x86, putuser: add ASM_CALL_CONSTRAINT

PATCH In review Alexey Dobriyan 2 participants 2 messages Mar 16, 2019 – Mar 24, 2019 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 x86, putuser: add ASM_CALL_CONSTRAINT

Clobber stack pointer given that assembly does CALL.

---

 arch/x86/include/asm/uaccess.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/include/asm/uaccess.h +2 -1
@@ -176,7 +176,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
 })
 
 #define __put_user_x(size, x, ptr, __ret_pu)			\
-	asm volatile("call __put_user_" #size : "=a" (__ret_pu)	\
+	asm volatile("call __put_user_" #size			\
+		     : "=a" (__ret_pu), ASM_CALL_CONSTRAINT	\
 		     : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
 
 
maintainer
#1 lore raw
Quoted 1 line · Alexey Dobriyan

Clobber stack pointer given that assembly does CALL.

Clobber?

Comment over ASM_CALL_CONSTRAINT talks about something else.

Also, pls change all your subject prefixes to

"x86/uaccess: ..."

Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.