lkml.org 
[lkml]   [2018]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/retpoline: Fill return stack buffer on vmexit
On Thu, Jan 11, 2018 at 09:07:09AM +0000, Woodhouse, David wrote:
> On Thu, 2018-01-11 at 09:49 +0100, Boris Petkov wrote:
> > On January 11, 2018 9:42:38 AM GMT+01:00, Peter Zijlstra wrote:
> > >Or we teach the alternative thing to patch in a jmp to end instead of
> > >NOP padding the entire thing as soon as the jmp (3 bytes) fits ?
> >
> > Or, even better: use alternative_call() to call functions instead of patching gazillion bytes.
>
> For this one I kind of wanted to keep it as a macro so we can select
> which register it uses.

can't you do lovely things like:

volatile asm ("call __fill_rsb_thunk_%1" : : "r" (dummy))

which would still let gcc select the register ?

\
 
 \ /
  Last update: 2018-01-14 23:22    [W:1.582 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site