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

2020-04-16 Thread Segher Boessenkool
On Thu, Apr 16, 2020 at 02:41:56PM +0200, Christophe Leroy wrote: > Le 16/04/2020 à 00:37, Segher Boessenkool a écrit : > >>+ __put_user_nocheck_goto((__typeof__(*(ptr)))(x), (ptr), > >>sizeof(*(ptr)), label) > > > >This line gets too long, can you break it up somehow? > > This line has 86 char

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

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 00:37, Segher Boessenkool a écrit : Hi! On Wed, Apr 15, 2020 at 09:25:59AM +, Christophe Leroy wrote: +#define __put_user_goto(x, ptr, label) \ + __put_user_nocheck_goto((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)), label) This line gets too long, can you break

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

2020-04-15 Thread Segher Boessenkool
Hi! On Wed, Apr 15, 2020 at 09:25:59AM +, Christophe Leroy wrote: > +#define __put_user_goto(x, ptr, label) \ > + __put_user_nocheck_goto((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)), > label) This line gets too long, can you break it up somehow? > +#define __put_user_asm_goto(x, addr

[PATCH v2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-04-15 Thread Christophe Leroy
unsafe_put_user() is designed to take benefit of 'asm goto'. Instead of using the standard __put_user() approach and branch based on the returned error, use 'asm goto' and make the exception code branch directly to the error label. There is no code anymore in the fixup section. This change signif