Thread (20 messages) 20 messages, 6 authors, 2020-06-13

Re: [PATCH v4 1/2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

From: Segher Boessenkool <hidden>
Date: 2020-05-06 22:18:36
Also in: lkml

On Wed, May 06, 2020 at 08:10:57PM +0200, Christophe Leroy wrote:
Le 06/05/2020 à 19:58, Segher Boessenkool a écrit :
quoted
quoted
 #define __put_user_asm_goto(x, addr, label, op)			\
 	asm volatile goto(					\
-		"1:	" op "%U1%X1 %0,%1	# put_user\n"	\
+		"1:	" op "%X1 %0,%1	# put_user\n"		\
 		EX_TABLE(1b, %l2)				\
 		:						\
-		: "r" (x), "m<>" (*addr)				\
+		: "r" (x), "m" (*addr)				\
 		:						\
 		: label)
Like that.  But you will have to do that to *all* places we use the "<>"
constraints, or wait for more stuff to fail?  And, there probably are
places we *do* want update form insns used (they do help in some loops,
for example)?
AFAICT, git grep "m<>" provides no result.
Ah, okay.
However many places have %Ux:
<snip>

Yes, all of those are from when "m" still meant what "m<>" is now.  For
seeing how many update form insns can be generated (and how much that
matters), these all should be fixed, at a minimum.


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help