lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <qeg7tr5jvmyyxvftl4k4qsa4hxga7hzvqcs2xbhfpeun5yhn3r@ua6pawrgxix5>
Date: Wed, 2 Apr 2025 11:44:15 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, amit@...nel.org, 
	kvm@...r.kernel.org, amit.shah@....com, thomas.lendacky@....com, tglx@...utronix.de, 
	peterz@...radead.org, pawan.kumar.gupta@...ux.intel.com, corbet@....net, 
	mingo@...hat.com, dave.hansen@...ux.intel.com, hpa@...or.com, seanjc@...gle.com, 
	pbonzini@...hat.com, daniel.sneddon@...ux.intel.com, kai.huang@...el.com, 
	sandipan.das@....com, boris.ostrovsky@...cle.com, Babu.Moger@....com, 
	david.kaplan@....com, dwmw@...zon.co.uk, andrew.cooper3@...rix.com
Subject: Re: [PATCH v3 1/6] x86/bugs: Rename entry_ibpb()

On Wed, Apr 02, 2025 at 08:29:28PM +0200, Borislav Petkov wrote:
> On Wed, Apr 02, 2025 at 11:19:18AM -0700, Josh Poimboeuf wrote:
> > There's nothing entry-specific about entry_ibpb().  In preparation for
> 
> Not anymore - it was done on entry back then AFAIR.
> 
> > calling it from elsewhere, rename it to __write_ibpb().
> > 
> > Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> > ---
> >  arch/x86/entry/entry.S               | 7 ++++---
> >  arch/x86/include/asm/nospec-branch.h | 6 +++---
> >  arch/x86/kernel/cpu/bugs.c           | 6 +++---
> >  3 files changed, 10 insertions(+), 9 deletions(-)
> > 
> > diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S
> > index d3caa31240ed..3a53319988b9 100644
> > --- a/arch/x86/entry/entry.S
> > +++ b/arch/x86/entry/entry.S
> > @@ -17,7 +17,8 @@
> >  
> >  .pushsection .noinstr.text, "ax"
> >  
> > -SYM_FUNC_START(entry_ibpb)
> > +// Clobbers AX, CX, DX
> 
> Why the ugly comment style if the rest of the file is already using the
> multiline one...

It helps it stand out more? :-)

> > +SYM_FUNC_START(__write_ibpb)
> 
> ... and why the __ ?

I was thinking the calling interface is a bit nonstandard.  But actually
it's fine to call from C as those registers are already caller-saved
anyway.  So yeah, let's drop the '__'.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ