linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	akpm@linux-foundation.org, broonie@kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linux-next@vger.kernel.org, mhocko@suse.cz,
	mm-commits@vger.kernel.org, sfr@canb.auug.org.au,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andy Lutomirski <luto@kernel.org>
Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool)
Date: Tue, 23 Apr 2019 19:39:12 +0200	[thread overview]
Message-ID: <20190423173912.GJ12232@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <D7626BC0-FCE9-4424-A6F5-D4AAB6727ED4@amacapital.net>

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.


  reply	other threads:[~2019-04-23 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19 21:53 mmotm 2019-04-19-14-53 uploaded akpm
2019-04-20  4:36 ` mmotm 2019-04-19-14-53 uploaded (objtool) Randy Dunlap
2019-04-23  8:24   ` Peter Zijlstra
2019-04-23 15:45     ` Randy Dunlap
2019-04-23 16:07     ` Andy Lutomirski
2019-04-23 17:39       ` Peter Zijlstra [this message]
2019-04-23 18:57         ` Peter Zijlstra
2019-04-23 16:19     ` Linus Torvalds
2019-04-23 17:35       ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190423173912.GJ12232@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mhocko@suse.cz \
    --cc=mm-commits@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox