[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EA9514A1-7DD7-4707-A104-1A891B602B49@alien8.de>
Date: Tue, 16 Aug 2022 18:14:57 +0000
From: Boris Petkov <bp@...en8.de>
To: Daniel Sneddon <daniel.sneddon@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Andrew Cooper <Andrew.Cooper3@...rix.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...e.de>, x86@...nel.org,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH] x86/nospec: Unwreck the RSB stuffing
On August 16, 2022 6:04:36 PM UTC, Daniel Sneddon <daniel.sneddon@...ux.intel.com> wrote:
>diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
>index 62f6b8b7c4a5..5c476b37b3bc 100644
>--- a/arch/x86/kernel/alternative.c
>+++ b/arch/x86/kernel/alternative.c
>@@ -284,6 +284,9 @@ void __init_or_module noinline apply_alternatives(struct
>alt_instr *start,
> /* Mask away "NOT" flag bit for feature to test. */
> u16 feature = a->cpuid & ~ALTINSTR_FLAG_INV;
I guess it is time for struct altinstr.flags. I never liked this INV mask bit...
>
>+ if (feature == X86_FEATURE_NEVER)
>+ goto next;
>+
> instr = (u8 *)&a->instr_offset + a->instr_offset;
> replacement = (u8 *)&a->repl_offset + a->repl_offset;
> BUG_ON(a->instrlen > sizeof(insn_buff));
>
--
Sent from a small device: formatting sux and brevity is inevitable.
Powered by blists - more mailing lists