Re: [PATCH v3 1/6] x86/bugs: Rename entry_ibpb()
From: Borislav Petkov
Date: Wed Apr 02 2025 - 14:30:37 EST
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@xxxxxxxxxx>
> ---
> 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...
> +SYM_FUNC_START(__write_ibpb)
... and why the __ ?
> ANNOTATE_NOENDBR
> movl $MSR_IA32_PRED_CMD, %ecx
> movl $PRED_CMD_IBPB, %eax
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette