From: Tim Chen <tim.c.chen@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Kosina <jikos@kernel.org>,
Tom Lendacky <thomas.lendacky@amd.com>,
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, x86@kernel.org
Subject: Re: [Patch v2 2/4] x86/speculation: Provide application property based STIBP protection
Date: Thu, 4 Oct 2018 12:19:46 -0700 [thread overview]
Message-ID: <c90810ac-e527-45af-1893-1e95c3da7dad@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1810022104480.1435@nanos.tec.linutronix.de>
On 10/02/2018 12:10 PM, Thomas Gleixner wrote:
> On Tue, 25 Sep 2018, Tim Chen wrote:
>
>> This patch provides an application property based spectre_v2
>
> # git grep 'This patch' Documentation/process/
>
>> protection with STIBP against attack from another app from
>
> s/app/application/ please. This is not android.
>
>> a sibling hyper-thread. For security sensitive non-dumpable
>> app, STIBP will be turned on before switching to it for Intel
>> processors vulnerable to spectre_v2.
>
> What has this to do with Intel processors?
>
>> -static __always_inline void intel_set_ssb_state(unsigned long tifn)
>> +static __always_inline void set_spec_ctrl_state(unsigned long tifn)
>> {
>> - u64 msr = x86_spec_ctrl_base | ssbd_tif_to_spec_ctrl(tifn);
>> + u64 msr = x86_spec_ctrl_base;
>> +
>> + if (static_cpu_has(X86_FEATURE_SSBD))
>> + msr |= ssbd_tif_to_spec_ctrl(tifn);
>> +
>> + if (cpu_smt_control == CPU_SMT_ENABLED)
>> + msr |= stibp_tif_to_spec_ctrl(tifn);
>
> Oh no. We are not adding yet another conditional into switch to. Either
> that's done unconditionally or this wants to have a static key.
Okay, will add a static_key to indicate that SMT is in use.
Tim
>
>> wrmsrl(MSR_IA32_SPEC_CTRL, msr);
>
> Thanks,
>
> tglx
>
next prev parent reply other threads:[~2018-10-04 19:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 0:43 [Patch v2 0/4] Provide options to enable spectre_v2 userspace-userspace protection Tim Chen
2018-09-26 0:43 ` [Patch v2 1/4] x86/speculation: Option to select app to app mitigation for spectre_v2 Tim Chen
2018-10-02 9:23 ` Ingo Molnar
2018-10-02 16:24 ` Tim Chen
2018-10-02 20:04 ` Thomas Gleixner
2018-09-26 0:43 ` [Patch v2 2/4] x86/speculation: Provide application property based STIBP protection Tim Chen
2018-10-02 19:10 ` Thomas Gleixner
2018-10-04 19:19 ` Tim Chen [this message]
2018-09-26 0:43 ` [Patch v2 3/4] x86/speculation: Extend per process STIBP to AMD cpus Tim Chen
2018-09-26 17:24 ` Tim Chen
2018-09-26 19:11 ` Lendacky, Thomas
2018-10-02 9:27 ` Ingo Molnar
2018-10-02 19:02 ` Thomas Gleixner
2018-09-26 0:43 ` [Patch v2 4/4] x86/speculation: Add prctl to control indirect branch speculation per process Tim Chen
2018-10-02 9:35 ` Ingo Molnar
2018-10-02 16:12 ` Tim Chen
2018-10-03 7:25 ` Ingo Molnar
2018-10-02 17:58 ` Thomas Gleixner
2018-10-05 18:12 ` Tim Chen
2018-10-05 18:46 ` Thomas Gleixner
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=c90810ac-e527-45af-1893-1e95c3da7dad@linux.intel.com \
--to=tim.c.chen@linux.intel.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=thomas.lendacky@amd.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
Powered by JetHome