[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180110015601.27370-2-andi@firstfloor.org>
Date: Tue, 9 Jan 2018 17:56:01 -0800
From: Andi Kleen <andi@...stfloor.org>
To: tglx@...utronix.de
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
torvalds@...ux-foundation.org, dwmw@...zon.co.uk, pjt@...gle.com,
luto@...nel.org, peterz@...radead.org, thomas.lendacky@....com,
tim.c.chen@...ux.intel.com, gregkh@...ux-foundation.org,
dave.hansen@...el.com, jikos@...nel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH v2 2/2] x86/retpoline: Use X86_RETPOLINE_COMMON to enable 32bit retpoline
From: Andi Kleen <ak@...ux.intel.com>
32bit uses a single retpoline sequence for AMD/Intel. Previously
X86_RETPOLINE was always set for AMD/Intel but that's not true anymore.
So now use the new X86_FEATURE_RETPOLINE_COMMON flag that is set
for both.
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
arch/x86/include/asm/nospec-branch.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index c1cef78f0e12..bbd5343f2fea 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -116,7 +116,7 @@
# define CALL_NOSPEC ALTERNATIVE( \
"call *%[thunk_target]\n", \
"call __x86_indirect_thunk_%V[thunk_target]\n", \
- X86_FEATURE_RETPOLINE)
+ X86_FEATURE_RETPOLINE_COMMON)
# define THUNK_TARGET(addr) [thunk_target] "r" (addr)
#elif defined(CONFIG_X86_32) && defined(CONFIG_RETPOLINE)
/*
@@ -142,7 +142,7 @@
" .align 16\n" \
"do_call%=:\n" \
" call do_retpoline%=;\n", \
- X86_FEATURE_RETPOLINE)
+ X86_FEATURE_RETPOLINE_COMMON)
# define THUNK_TARGET(addr) [thunk_target] "rm" (addr)
#else /* No retpoline */
--
2.14.3
Powered by blists - more mailing lists