lkml.org 
[lkml]   [2019]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mmotm 2019-04-19-14-53 uploaded (objtool)
On Tue, Apr 23, 2019 at 09:07:01AM -0700, Andy Lutomirski wrote:
> > diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
> > index 22ba683afdc2..c82abd6e4ca3 100644
> > --- a/arch/x86/include/asm/uaccess.h
> > +++ b/arch/x86/include/asm/uaccess.h
> > @@ -427,10 +427,11 @@ do { \
> > ({ \
> > __label__ __pu_label; \
> > int __pu_err = -EFAULT; \
> > - __typeof__(*(ptr)) __pu_val; \
> > - __pu_val = x; \
> > + __typeof__(*(ptr)) __pu_val = (x); \
> > + __typeof__(ptr) __pu_ptr = (ptr); \
>
> Hmm. I wonder if this forces the address calculation to be done
> before STAC, which means that gcc can’t use mov ..., %gs:(fancy
> stuff). It probably depends on how clever the optimizer is. Have you
> looked at the generated code?

I have not; will do before posting the real patch.

\
 
 \ /
  Last update: 2019-04-23 19:39    [W:0.056 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site