Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1313897imu; Wed, 9 Jan 2019 15:58:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN4mYPTZb4A6sDFSQLoF7LCHUhQ7BSCI1s4/qSoZF7iXAU9an9UJ0Z6Nh8iR5sTTs1zIOv17 X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr8120903plx.232.1547078312666; Wed, 09 Jan 2019 15:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547078312; cv=none; d=google.com; s=arc-20160816; b=kyaSqR0OEkYm7TX02w/u2i8WaQm/WtUFNAVx+5WxwKeG6n/LDFPbmu/jGOZbLhTrVj 0IgSEflF3WlJWRHzBG1ZSk/NruxiSyLV0tFL0jtQHDfJO2cE68ZwcIiue/FvCJ3t8CCz bycmy9cJmnoxjjdeHwJ658zXKzj0K7iymtSt53FrugN/4XoKJkep3PSqc5y3PWBHsugW QJlyd1hKA5Ht/BotxjTpsXf9o7eMtEy8FyiDPmCEl+waobd3/pUKKTYjt1tuPJ8qo5SR 4BDmUFazwTbmUmWJoWHnYRaPRLxFD4M5RnQhw36tp5KfQ3uYDhF2NAY26fgFomarf/jq dNkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Si3Ru5NVN82DRY1UeuwaI0c5Re2hjXa33RQJSiSoovE=; b=yncL1NYRBaEkjwZdXquvKa/oWvZ0uYQ0C22tI8aYQljr+TRNOfitynFUW8hbpYQQ9e uIMk8jjAHQIA4ECHz8FTgok7dFdHdbEFk33H7IGA7vot+7e+cbnLUTlKizudrM6F/3oP JLpfFmXMERUq70OYOVYeKjvmRon+1zA54BisaS91CPwO5NIsEqr+XW4Kto0Wtcqvo1h3 2a3+dYR6dfz6OkLkUzzoK4vYoPqOa137i4kVnpLJs+vuIwr4pRmFPb0pzsM4l3Q7HIGp CukkkHx/vdQAseGAAzDTloObpS8IcTBP6NJ92s9qtBvkhEOG8ineyrNTn1VdVeq51YRv RvjA== 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 w185si26395516pgd.518.2019.01.09.15.58.17; Wed, 09 Jan 2019 15:58:32 -0800 (PST) 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 S1726709AbfAIXz4 (ORCPT + 99 others); Wed, 9 Jan 2019 18:55:56 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:53328 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726580AbfAIXzw (ORCPT ); Wed, 9 Jan 2019 18:55:52 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5FA8AA78; Wed, 9 Jan 2019 15:55:52 -0800 (PST) Received: from beelzebub.austin.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AF7233F5AF; Wed, 9 Jan 2019 15:55:51 -0800 (PST) From: Jeremy Linton To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will.deacon@arm.com, marc.zyngier@arm.com, suzuki.poulose@arm.com, dave.martin@arm.com, shankerd@codeaurora.org, linux-kernel@vger.kernel.org, ykaukab@suse.de, julien.thierry@arm.com, mlangsdo@redhat.com, steven.price@arm.com, stefan.wahren@i2se.com, Jeremy Linton Subject: [PATCH v3 2/7] arm64: add sysfs vulnerability show for spectre v1 Date: Wed, 9 Jan 2019 17:55:39 -0600 Message-Id: <20190109235544.2992426-3-jeremy.linton@arm.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190109235544.2992426-1-jeremy.linton@arm.com> References: <20190109235544.2992426-1-jeremy.linton@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mian Yousaf Kaukab spectre v1, has been mitigated, and the mitigation is always active. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Jeremy Linton --- arch/arm64/kernel/cpu_errata.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index 09ac548c9d44..8dde8c616b7e 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -109,6 +109,8 @@ cpu_enable_trap_ctr_access(const struct arm64_cpu_capabilities *__unused) atomic_t arm64_el2_vector_last_slot = ATOMIC_INIT(-1); +uint arm64_requested_vuln_attrs = VULN_SPECTREV1; + #ifdef CONFIG_HARDEN_BRANCH_PREDICTOR #include #include @@ -742,3 +744,18 @@ const struct arm64_cpu_capabilities arm64_errata[] = { { } }; + +#ifdef CONFIG_GENERIC_CPU_VULNERABILITIES + +uint arch_supported_vuln_attr_fields(void) +{ + return arm64_requested_vuln_attrs; +} + +ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, + char *buf) +{ + return sprintf(buf, "Mitigation: __user pointer sanitization\n"); +} + +#endif -- 2.17.2