[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180118131513.jzhqyd2ucrwwnwez@pd.tnic>
Date: Thu, 18 Jan 2018 14:15:13 +0100
From: Borislav Petkov <bp@...en8.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: David Woodhouse <dwmw2@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
linux-kernel@...r.kernel.org, Dave Hansen <dave.hansen@...el.com>,
Ashok Raj <ashok.raj@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg KH <gregkh@...uxfoundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
Arjan Van De Ven <arjan.van.de.ven@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Jun Nakajima <jun.nakajima@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>
Subject: Re: [PATCH v2 05/10] x86: Annotate static_cpu_has alternative
On Tue, Jan 16, 2018 at 03:28:30PM +0100, Peter Zijlstra wrote:
> In order to recognise static_cpu_has() alternatives from any other
> alternative without dodgy heuristics, we need to explicitly mark them.
> Use the new type field for this.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> arch/x86/include/asm/alternative.h | 1 +
> arch/x86/include/asm/cpufeature.h | 5 +++--
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> --- a/arch/x86/include/asm/alternative.h
> +++ b/arch/x86/include/asm/alternative.h
> @@ -46,6 +46,7 @@
> #endif
>
> #define ALT_TYPE_DEFAULT 0
> +#define ALT_TYPE_STATIC_CPU_HAS 1 /* objtool, static_cpu_has */
Just a nitpick: let's be more verbose in that comment:
/*
* This alt_instr descriptor is part of a static_cpu_has() construct. Use it to
* detect its type when processing with other tools, like objtool, for example.
*/
#define ALT_TYPE_STATIC_CPU_HAS 1
With that:
Reviewed-by: Borislav Petkov <bp@...e.de>
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists