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 10:32:31AM +0100, Peter Zijlstra wrote:
> can't you do lovely things like:
>
> volatile asm ("call __fill_rsb_thunk_%1" : : "r" (dummy))
>
> which would still let gcc select the register ?

Calling a function from asm is nasty because you need to pay attention
to clobbered registers as gcc doesn't see the function.

What one can do, I *think*, is do a non-inlined wrapping function and do
all the alternative_call() fun inside. There you can do all the fun and
have callee-clobbered regs which you can use.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

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