From patchwork Mon Apr 15 21:21:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 162280 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3418794jan; Mon, 15 Apr 2019 14:22:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyIx1KL9SHg1bhtyhSCfsCUVZKiFT+ulw5SMS4UB7Q1geJ34C3X8yaIdlF5OqmSH1SpDBh X-Received: by 2002:a63:4a5a:: with SMTP id j26mr72525176pgl.361.1555363350542; Mon, 15 Apr 2019 14:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555363350; cv=none; d=google.com; s=arc-20160816; b=pNJuj9jhL1cIyFm8Nd7cZur86zKea0W1YsjcUEdmggyO/+G8zK07kZEtfiKjCfkGpn ZfRC7Jb5mK0fIzDPizjDGO9U3eo+qJTNhl/8NGFLkDGpPHKR8uVff1DpIhuwSDeppgJ+ OtiCMu5s1W3q4T+2XCYz32Txb3y3b/0AwE9g2C1L8+1xOEN3xerBZAoh2CyFZhaBj88G WuWEWWP2zzGQd4T5yeKUWXr1bykBGy9qE/7t00K55lUR4punI/ForTWMqVoadVsE6vWg XZHJ3LsG45/GYwjBvc/yD4jMTNX6f+pfdc4MazEHRV8s5ai3srBtnv44Xb7hRDyra9Vg 873A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=icZMQR98thfR3iCLpBwjnjTX/PUYNalFPwZ9x92ZF5Q=; b=frECBvUsjzTCYfpIjONR3jfZ9p7V19sWnVa5znuB/nXN6R3XqWPlssrt4UAmtYE3Rf 3iSxBYYOT8m/XQXzKJZynoecyI38tuJFxanvT0lnSRd3mu2H+QliJ95LDCuzz50PCZPe Bb2T08pL82HIvM29fzgr8fR4A9k1+YH9nZ/dGf8njUCavUl3kw6qlSGwMQyOqhGcNxWt jXfNJf6bZTZWuzUEeTWUefCRbFgniXLQPpK9vQheS0O9vJeV2BzVbGj6zWyfPARZl8+k tk741JplZ6fWTyvFmRR3MWcknPvX/irIn/mK4CB4o2oPBP9Wxv7/6RsGCb7g3sr5GZQc TvUg== 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 q23si39542123pll.21.2019.04.15.14.22.30; Mon, 15 Apr 2019 14:22:30 -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 S1728225AbfDOVW2 (ORCPT + 30 others); Mon, 15 Apr 2019 17:22:28 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42890 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728003AbfDOVVk (ORCPT ); Mon, 15 Apr 2019 17:21:40 -0400 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 3C2391684; Mon, 15 Apr 2019 14:21:40 -0700 (PDT) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.29.246]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 82A093F68F; Mon, 15 Apr 2019 14:21:39 -0700 (PDT) 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, julien.thierry@arm.com, mlangsdo@redhat.com, stefan.wahren@i2se.com, Andre.Przywara@arm.com, linux-kernel@vger.kernel.org, Mian Yousaf Kaukab , Jeremy Linton , Andre Przywara Subject: [v8 02/10] arm64: add sysfs vulnerability show for spectre v1 Date: Mon, 15 Apr 2019 16:21:21 -0500 Message-Id: <20190415212129.1112-3-jeremy.linton@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190415212129.1112-1-jeremy.linton@arm.com> References: <20190415212129.1112-1-jeremy.linton@arm.com> MIME-Version: 1.0 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 Reviewed-by: Andre Przywara Reviewed-by: Catalin Marinas Tested-by: Stefan Wahren Acked-by: Suzuki K Poulose --- arch/arm64/kernel/cpu_errata.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index d2b2c69d31bb..cf623657cf3c 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -755,3 +755,9 @@ const struct arm64_cpu_capabilities arm64_errata[] = { { } }; + +ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr, + char *buf) +{ + return sprintf(buf, "Mitigation: __user pointer sanitization\n"); +}