[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DS0PR12MB9273D3CAD0EED60F0CC7547994E9A@DS0PR12MB9273.namprd12.prod.outlook.com>
Date: Thu, 16 Oct 2025 14:16:04 +0000
From: "Kaplan, David" <David.Kaplan@....com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>, Josh
Poimboeuf <jpoimboe@...nel.org>, Pawan Gupta
<pawan.kumar.gupta@...ux.intel.com>, Ingo Molnar <mingo@...hat.com>, Dave
Hansen <dave.hansen@...ux.intel.com>, "x86@...nel.org" <x86@...nel.org>, "H .
Peter Anvin" <hpa@...or.com>, Alexander Graf <graf@...zon.com>, Boris
Ostrovsky <boris.ostrovsky@...cle.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH 31/56] x86/alternative: Prepend nops with retpolines
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Peter Zijlstra <peterz@...radead.org>
> Sent: Thursday, October 16, 2025 9:08 AM
> To: Kaplan, David <David.Kaplan@....com>
> Cc: Thomas Gleixner <tglx@...utronix.de>; Borislav Petkov <bp@...en8.de>; Josh
> Poimboeuf <jpoimboe@...nel.org>; Pawan Gupta
> <pawan.kumar.gupta@...ux.intel.com>; Ingo Molnar <mingo@...hat.com>; Dave
> Hansen <dave.hansen@...ux.intel.com>; x86@...nel.org; H . Peter Anvin
> <hpa@...or.com>; Alexander Graf <graf@...zon.com>; Boris Ostrovsky
> <boris.ostrovsky@...cle.com>; linux-kernel@...r.kernel.org
> Subject: Re: [RFC PATCH 31/56] x86/alternative: Prepend nops with retpolines
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Thu, Oct 16, 2025 at 01:27:53PM +0000, Kaplan, David wrote:
>
> > > Ah, I found it, you freeze everything, which puts it at safe points.
> >
> > Yes. In fact, I think you were the one who pointed me in that direction :)
>
> Heh, yeah, I remembered talking to you about this, but had forgotten all
> details. I quickly checked the cover letter, but found insufficient
> detail there, so I went and asked. Then later memory started coming back
> and I went looking for it in later patches.
>
> > Despite the freezer though, this patch is necessary in particular
> > because stop_machine_nmi() uses an indirect branch to run the handler.
> > Which means that while patching is going on, all cores are inside a
> > function which is going to return to after the indirect call site.
> > And so that needs to be the end of the 5 (or 6) byte sequence.
>
> Yeah, makes sense. But I like I wrote, I think prefix stuffing might be
> a better option.
Ok, and that's because we need at most 3 prefixes as Intel uarch's don't have significant penalties at 3 prefixes, only at 4+?
I'll need to check on this on the AMD side too.
--David Kaplan
Powered by blists - more mailing lists