Messages in this thread | | | Date | Thu, 20 Jul 2017 10:18:13 -0500 | From | Josh Poimboeuf <> | 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@redhat.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
| |