From: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>
To: Tim Chen <tim.c.chen@linux.intel.com>,
Jiri Kosina <jikos@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Andrea Arcangeli <aarcange@redhat.com>,
David Woodhouse <dwmw@amazon.co.uk>,
Andi Kleen <ak@linux.intel.com>,
Dave Hansen <dave.hansen@intel.com>,
Casey Schaufler <casey.schaufler@intel.com>,
Asit Mallick <asit.k.mallick@intel.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Jon Masters <jcm@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH 0/2] Provide options to enable spectre_v2 userspace-userspace protection
Date: Thu, 20 Sep 2018 21:38:59 +0000 [thread overview]
Message-ID: <3609a852-1477-a5b2-3858-c2cbfb3999a9@amd.com> (raw)
In-Reply-To: <cover.1537392876.git.tim.c.chen@linux.intel.com>
On 09/19/2018 04:35 PM, Tim Chen wrote:
> This patchset provides an option to apply IBPB and STIBP mitigation
> to only non-dumpable processes.
>
> Jiri's patch to harden spectre_v2 makes IBPB and STIBP available for
> general spectre v2 app to app mitigation. IBPB will be issued for
> switching to an app that's not ptraceable by the previous
> app and STIBP will be always turned on.
>
> However, leaving STIBP on all the time is expensive for certain
> applications that have frequent indirect branches. One such application
> is perlbench in the SpecInt Rate 2006 test suite which shows a
> 21% reduction in throughput. Other application like bzip2 in
> the same test suite with minimal indirct branches have
> only a 0.7% reduction in throughput. IBPB will also impose
> overhead during context switches.
>
> App to app exploit is in general difficult
> due to address space layout randomization in apps and
> the need to know an app's address space layout ahead of time.
> Users may not wish to incur app to app performance
> overhead from IBPB and STIBP for general non security sensitive apps
> and use these mitigations only for non-dumpable apps.
>
> The first patch provides a lite option for spectre_v2 app to app
> mitigation where IBPB is only issued for security sensitive
> non-dumpable app. The second patch extends this option
> where STIBP is only issued for non-dumpable app.
>
> The changes apply to intel cpus affected by spectre_v2. Tom,
> can you update the STIBP changes for AMD cpus on
> __speculative_store_bypass_update and x86_virt_spec_ctrl
> to update the SPEC_CTRL msr for AMD cpu?
Hi Tim,
Let me think about this a bit, since it can get a bit tricky if
I want to avoid multiple MSR writes when only one may have been
needed (assuming SSBD is not using the SPEC_CTRL MSR).
Thanks,
Tom
>
> Thanks.
>
> Tim
>
> Tim Chen (2):
> x86/speculation: Option to select app to app mitigation for spectre_v2
> x86/speculation: Provide application property based STIBP protection
>
> Documentation/admin-guide/kernel-parameters.txt | 11 +++
> arch/x86/include/asm/msr-index.h | 3 +-
> arch/x86/include/asm/nospec-branch.h | 9 ++
> arch/x86/include/asm/spec-ctrl.h | 12 +++
> arch/x86/include/asm/thread_info.h | 4 +-
> arch/x86/kernel/cpu/bugs.c | 105 ++++++++++++++++++++++--
> arch/x86/kernel/process.c | 9 +-
> arch/x86/mm/tlb.c | 41 ++++++++-
> 8 files changed, 179 insertions(+), 15 deletions(-)
>
next prev parent reply other threads:[~2018-09-20 21:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 21:35 Tim Chen
2018-09-19 21:35 ` [PATCH 1/2] x86/speculation: Option to select app to app mitigation for spectre_v2 Tim Chen
2018-09-19 21:35 ` [PATCH 2/2] x86/speculation: Provide application property based STIBP protection Tim Chen
2018-09-20 7:57 ` Peter Zijlstra
2018-09-20 17:17 ` Tim Chen
2018-09-20 8:00 ` Peter Zijlstra
2018-09-20 17:32 ` Tim Chen
2018-10-02 15:41 ` Jon Masters
2018-10-02 15:43 ` Jiri Kosina
2018-10-02 15:44 ` Jon Masters
2018-09-20 21:38 ` Lendacky, Thomas [this message]
2018-09-21 15:44 ` [PATCH 0/2] Provide options to enable spectre_v2 userspace-userspace protection Lendacky, Thomas
2018-09-21 17:14 ` Tim Chen
2018-09-21 17:44 ` Lendacky, Thomas
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=3609a852-1477-a5b2-3858-c2cbfb3999a9@amd.com \
--to=thomas.lendacky@amd.com \
--cc=aarcange@redhat.com \
--cc=ak@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=asit.k.mallick@intel.com \
--cc=casey.schaufler@intel.com \
--cc=dave.hansen@intel.com \
--cc=dwmw@amazon.co.uk \
--cc=jcm@redhat.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.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
all inboxes | Powered by JetHome®