From: Anand K Mistry <amistry@google.com>
To: x86@kernel.org, linux-kernel@kernel.org
Cc: Thomas.Lendacky@amd.com, joelaf@google.com,
asteinhauser@google.com, tglx@linutronix.de,
Anand K Mistry <amistry@google.com>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Ingo Molnar <mingo@redhat.com>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Mark Gross <mgross@linux.intel.com>,
Mike Rapoport <rppt@kernel.org>,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Tony Luck <tony.luck@intel.com>,
Vineela Tummalapalli <vineela.tummalapalli@intel.com>,
Waiman Long <longman@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP
Date: Thu, 29 Oct 2020 17:51:32 +1100 [thread overview]
Message-ID: <20201029065133.3027749-1-amistry@google.com> (raw)
When attempting to do some performance testing of IBPB on and AMD
platform, I noticed the IBPB instruction was never being issued, even
though it was conditionally on and various seccomp protected processes
were force enabling it. Turns out, on those AMD CPUs, STIBP is set to
always-on and this was causing an early-out on the prctl() which turns
off IB speculation. Here is my attempt to fix it.
I'm hoping someone that understands this better than me can explain why
I'm wrong.
Anand K Mistry (1):
x86/speculation: Allow IBPB to be conditionally enabled on CPUs with
always-on STIBP
arch/x86/kernel/cpu/bugs.c | 41 +++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 18 deletions(-)
--
2.29.1.341.ge80a0c044ae-goog
next reply other threads:[~2020-10-29 7:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 6:51 Anand K Mistry [this message]
2020-10-29 6:51 ` [PATCH 1/1] x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP Anand K Mistry
2020-10-31 15:05 ` Tom Lendacky
2020-11-02 0:02 ` Anand K. Mistry
2020-11-03 10:57 ` Borislav Petkov
2020-11-04 23:31 ` Joel Fernandes
2020-11-05 1:13 ` Anand K. Mistry
2020-10-31 14:50 ` [PATCH 0/1] " Tom Lendacky
2020-11-01 23:57 ` Anand K. Mistry
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=20201029065133.3027749-1-amistry@google.com \
--to=amistry@google.com \
--cc=Thomas.Lendacky@amd.com \
--cc=asteinhauser@google.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=joelaf@google.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mgross@linux.intel.com \
--cc=mingo@redhat.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=rppt@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vineela.tummalapalli@intel.com \
--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