Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp698131imm; Wed, 26 Sep 2018 05:33:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV62IUiHc//VSMmh9M4GNsqHTPoYXsub2qi8UU5HZJUfDaXhH3NavOFOOcvK2KuSgV/NHEYhh X-Received: by 2002:a62:e511:: with SMTP id n17-v6mr6095469pff.210.1537965234410; Wed, 26 Sep 2018 05:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537965234; cv=none; d=google.com; s=arc-20160816; b=fDZkNANAP8SSBk2HtgAX0Hbd+weM1uLbdXBEm9hYF7IOn6YTECRZDCE3yzBIwzSIN0 MOk3wi1QoC1amYuMpuaCGz7yvbkooJYscj7emK9lH6nNuuSgqo6ZGXC3FlKTuVA7OZ3a /3Y/6csXPRK8mGJOpvDMVJ9QYDqSFggh72ZY3EYITvQVaZHRUpyW1SZvM7OYBXtopNoS dGYmofyClQLywb3Cp04CH0N4UfOTfvKyR6g6mCyzwsXtIGYR0mWQY/nAoTqmUR0i2QPD a2FquckawqYzXVH2hMUhv94b68q+IvF2YRTQ+a3U8c+jPWrcmM5sTDMO522FrFpmQXfi OgAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=lzZz6UPdakC26lecCvaagGQN7av+/pGylZRfpdDfjjw=; b=PjkkceL4WoIVEEmSo0aQ29AeiLfjiGzpmqJdybKFbcG2+5AbQaBOiW4AcJDG80V4NX poedBamWZkfWkG7WQhxNiY1oeweNk7Xn9vFhykq7gqix1trmmBfhmkn4u/5LffpG4o3X +i58Hv+2LeKWQLPlLD9vpRUwOWdcjPi+M60+co4GSFkb161tIit5DOQLmnHvI1JFjwrz +5qA9tdfliS/9OCzWPd2WsrkGKDDuPyxTEBMx5L3Pzo/6RNcKQkHNgcPUKLl7/aB4ubR et+C74xH9HnuqY8fth4Og62IqiTW749XafdXa4NiTXvDmt1SOmJZRGXIybzbpqPDaB4v AdBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i21-v6si4980555pgg.513.2018.09.26.05.33.39; Wed, 26 Sep 2018 05:33:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728029AbeIZSpk (ORCPT + 99 others); Wed, 26 Sep 2018 14:45:40 -0400 Received: from terminus.zytor.com ([198.137.202.136]:58275 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbeIZSpk (ORCPT ); Wed, 26 Sep 2018 14:45:40 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w8QCVxA23830639 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Sep 2018 05:31:59 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w8QCVx9B3830636; Wed, 26 Sep 2018 05:31:59 -0700 Date: Wed, 26 Sep 2018 05:31:59 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Jiri Kosina Message-ID: Cc: dwmw@amazon.co.uk, hpa@zytor.com, ak@linux.intel.com, aarcange@redhat.com, mingo@kernel.org, tglx@linutronix.de, jkosina@suse.cz, peterz@infradead.org, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, casey.schaufler@intel.com Reply-To: tim.c.chen@linux.intel.com, peterz@infradead.org, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, casey.schaufler@intel.com, dwmw@amazon.co.uk, aarcange@redhat.com, ak@linux.intel.com, hpa@zytor.com, mingo@kernel.org, jkosina@suse.cz, tglx@linutronix.de In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/speculation: Propagate information about RSB filling mitigation to sysfs Git-Commit-ID: bb4b3b7762735cdaba5a40fd94c9303d9ffa147a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=0.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_03_06 autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: bb4b3b7762735cdaba5a40fd94c9303d9ffa147a Gitweb: https://git.kernel.org/tip/bb4b3b7762735cdaba5a40fd94c9303d9ffa147a Author: Jiri Kosina AuthorDate: Tue, 25 Sep 2018 14:39:28 +0200 Committer: Thomas Gleixner CommitDate: Wed, 26 Sep 2018 14:26:52 +0200 x86/speculation: Propagate information about RSB filling mitigation to sysfs If spectrev2 mitigation has been enabled, RSB is filled on context switch in order to protect from various classes of spectrev2 attacks. If this mitigation is enabled, say so in sysfs for spectrev2. Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Andrea Arcangeli Cc: "WoodhouseDavid" Cc: Andi Kleen Cc: Tim Chen Cc: "SchauflerCasey" Link: https://lkml.kernel.org/r/nycvar.YFH.7.76.1809251438580.15880@cbobk.fhfr.pm --- 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;