[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190423173912.GJ12232@hirez.programming.kicks-ass.net>
Date: Tue, 23 Apr 2019 19:39:12 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andy Lutomirski <luto@...capital.net>
Cc: Randy Dunlap <rdunlap@...radead.org>, akpm@...ux-foundation.org,
broonie@...nel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-next@...r.kernel.org, mhocko@...e.cz,
mm-commits@...r.kernel.org, sfr@...b.auug.org.au,
Josh Poimboeuf <jpoimboe@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: 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.
Powered by blists - more mailing lists