From: Andi Kleen <andi@firstfloor.org>
To: tglx@linutronix.de
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org, dwmw@amazon.co.uk, pjt@google.com,
luto@kernel.org, peterz@infradead.org, thomas.lendacky@amd.com,
tim.c.chen@linux.intel.com, gregkh@linux-foundation.org,
dave.hansen@intel.com, jikos@kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH v2 2/2] x86/retpoline: Use X86_RETPOLINE_COMMON to enable 32bit retpoline
Date: Tue, 9 Jan 2018 17:56:01 -0800 [thread overview]
Message-ID: <20180110015601.27370-2-andi@firstfloor.org> (raw)
In-Reply-To: <20180110015601.27370-1-andi@firstfloor.org>
From: Andi Kleen <ak@linux.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@linux.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
prev parent reply other threads:[~2018-01-10 1:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 1:56 [PATCH v2 1/2] x86/retpoline: Add X86_FEATURE_RETPOLINE_COMMON and split RETPLINE/RETPOLINE_AMD Andi Kleen
2018-01-10 1:56 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180110015601.27370-2-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=dave.hansen@intel.com \
--cc=dwmw@amazon.co.uk \
--cc=gregkh@linux-foundation.org \
--cc=jikos@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tim.c.chen@linux.intel.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome