[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170720151813.5wnpsb5wy7bqrpec@treble>
Date: Thu, 20 Jul 2017 10:18:13 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Andrey Ryabinin <ryabinin.a.a@...il.com>
Cc: Matthias Kaehlcke <mka@...omium.org>,
Chris J Arges <chris.j.arges@...onical.com>,
Borislav Petkov <bp@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
"x86@...nel.org" <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Douglas Anderson <dianders@...omium.org>,
Michael Davidson <md@...gle.com>,
Greg Hackmann <ghackmann@...gle.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Stephen Hines <srhines@...gle.com>,
Kees Cook <keescook@...omium.org>,
Arnd Bergmann <arnd@...db.de>,
Bernhard Rosenkränzer
<Bernhard.Rosenkranzer@...aro.org>
Subject: Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in
get_user() inline asm"
On Thu, Jul 20, 2017 at 01:01:39PM +0300, Andrey Ryabinin wrote:
> 2017-07-19 20:46 GMT+03:00 Josh Poimboeuf <jpoimboe@...hat.com>:
>
> >
> > After doing some testing, I don't think this approach is going to work
> > after all. In addition to forcing the stack frame, it also causes GCC
> > to add an unnecessary extra instruction to the epilogue of each affected
> > function:
> >
> > lea -0x10(%rbp),%rsp
> >
> > We shouldn't be inserting extra instructions like that. I also don't
> > think the other suggestion of turning the '__sp' register variable into
> > a global variable is a very good solution either, as that just wastes
> > memory for no reason.
> >
>
> Wastes memory? How is that wastes memory? That doesn't make any sense.
Yes, you're right, that doesn't make any sense. I think I was trying to
wrap my head around what it means to have a global register variable --
in a header file no less -- and why clang would treat that differently
than a local register variable.
--
Josh
Powered by blists - more mailing lists