[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180111093231.GX6176@hirez.programming.kicks-ass.net>
Date: Thu, 11 Jan 2018 10:32:31 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: "Woodhouse, David" <dwmw@...zon.co.uk>
Cc: "Thomas.Lendacky@....com" <Thomas.Lendacky@....com>,
"bp@...en8.de" <bp@...en8.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"Ghitulete, Razvan-alin" <rga@...zon.com>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>,
"riel@...hat.com" <riel@...hat.com>,
"keescook@...gle.com" <keescook@...gle.com>,
"gnomes@...rguk.ukuu.org.uk" <gnomes@...rguk.ukuu.org.uk>,
"pjt@...gle.com" <pjt@...gle.com>,
"dave.hansen@...el.com" <dave.hansen@...el.com>,
"luto@...capital.net" <luto@...capital.net>,
"jikos@...nel.org" <jikos@...nel.org>,
"gregkh@...ux-foundation.org" <gregkh@...ux-foundation.org>
Subject: Re: [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 ?
Powered by blists - more mailing lists