lkml.org 
[lkml]   [2017]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2017-07-20 23:23    [W:0.075 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site