From: Jiri Kosina <jikos@kernel.org> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Josh Poimboeuf <jpoimboe@redhat.com>, Andrea Arcangeli <aarcange@redhat.com>, "Woodhouse, David" <dwmw@amazon.co.uk>, Andi Kleen <ak@linux.intel.com>, Tim Chen <tim.c.chen@linux.intel.com>, "Schaufler, Casey" <casey.schaufler@intel.com> Cc: linux-kernel@vger.kernel.org, x86@kernel.org Subject: [PATCH v7 3/3] x86/speculation: Propagate information about RSB filling mitigation to sysfs Date: Tue, 25 Sep 2018 14:39:28 +0200 (CEST) [thread overview] Message-ID: <nycvar.YFH.7.76.1809251438580.15880@cbobk.fhfr.pm> (raw) In-Reply-To: <nycvar.YFH.7.76.1809251431260.15880@cbobk.fhfr.pm> From: Jiri Kosina <jkosina@suse.cz> If spectrev2 mitigation has been enabled, we're filling RSB on context switch in order to protect from various classess of spectrev2 attacks. If this mitigation is enabled, say so in sysfs for spectrev2. Signed-off-by: Jiri Kosina <jkosina@suse.cz> --- arch/x86/kernel/cpu/bugs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 53eb14a65610..fe32103fcdc7 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -874,10 +874,11 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr return sprintf(buf, "Mitigation: __user pointer sanitization\n"); case X86_BUG_SPECTRE_V2: - ret = sprintf(buf, "%s%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled], + ret = sprintf(buf, "%s%s%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled], boot_cpu_has(X86_FEATURE_USE_IBPB) ? ", IBPB" : "", boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? ", IBRS_FW" : "", (x86_spec_ctrl_base & SPEC_CTRL_STIBP) ? ", STIBP" : "", + boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? ", RSB filling" : "", spectre_v2_module_string()); return ret; -- 2.12.3 -- Jiri Kosina SUSE Labs
next prev parent reply other threads:[~2018-09-25 12:39 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-09-25 12:37 [PATCH v7 0/3] Harden spectrev2 userspace-userspace protection Jiri Kosina 2018-09-25 12:38 ` [PATCH v7 1/3] x86/speculation: apply IBPB more strictly to avoid cross-process data leak Jiri Kosina 2018-09-26 12:30 ` [tip:x86/pti] x86/speculation: Apply " tip-bot for Jiri Kosina 2018-09-27 20:18 ` [PATCH v7 1/3] x86/speculation: apply " Stephen Smalley 2018-09-27 20:28 ` Thomas Gleixner 2018-09-25 12:38 ` [PATCH v7 2/3] x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation Jiri Kosina 2018-09-26 12:31 ` [tip:x86/pti] " tip-bot for Jiri Kosina 2018-09-25 12:39 ` Jiri Kosina [this message] 2018-09-26 12:31 ` [tip:x86/pti] x86/speculation: Propagate information about RSB filling mitigation to sysfs tip-bot for Jiri Kosina
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=nycvar.YFH.7.76.1809251438580.15880@cbobk.fhfr.pm \ --to=jikos@kernel.org \ --cc=aarcange@redhat.com \ --cc=ak@linux.intel.com \ --cc=casey.schaufler@intel.com \ --cc=dwmw@amazon.co.uk \ --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 \ --subject='Re: [PATCH v7 3/3] x86/speculation: Propagate information about RSB filling mitigation to sysfs' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.