From patchwork Tue Oct 8 15:39:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 175516 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5867507ill; Tue, 8 Oct 2019 08:42:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXH6cT9fX0bewGHvROaPWzgrLtQGlNyJhGQ9dshChdoST0W8kAIcjHTyEBUVOVNXFGcUot X-Received: by 2002:a50:a532:: with SMTP id y47mr34379094edb.273.1570549219535; Tue, 08 Oct 2019 08:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570549219; cv=none; d=google.com; s=arc-20160816; b=rAHpZyV4FKJPSO8mq3SlHrNT0jgEapZ9Ym6hxH4cf6qqo3c7SbYztqbe1wV/6yh/Mb Eo8qBeTEaNXXplu18kNtFeChOIlR74XOxpR5ygHmO+kO4kwc1XxLmhht8xp33MWJOnVL ydDKrs/NhvZotX3KnETkenqaqWXBtmQQzuOjPsY2PCsIo/iNXSXMPDz52NziqzZFXcXM 45QQtTHCUfQAlbzm3VnxaWU8U6x0Rva3c7bWu0HY4x6IFHyiQK6XXl6ajjB5klVE5sv2 wSag4Wo1IwLh3a2EllhUjTrZYkCZ61Zuh3tzNF3hWCaP2yAkUpLik3w0C4Ka5yLU0CEm QfXg== 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 :dkim-signature; bh=/vtISEtUshe9NBLXroiK2UL/EjV2n3/vwtTUKw/aRUg=; b=tB9+zLn/aDOJaobRG2XPiaGtucE0bZRWO80rQQA0xhGZY/h+yvwTeYRMC+wmslRLvZ l7Y4EQI+oq/e+Wi3CG5e7XWLG4BKlg/MfI16tNUc5A5iIAd6wR/OYJ5vlXGQXkAuuRlV dhUXAJoulREQaslTYYnNusKyuYEPLjvjKSNtePOkFKDO8jvENK6PGYSF4OZ5Mdy1hway U8CBynk8HWCI9fD5Li3AibzwbKb134eGCclUFMzesUEv1RDRCecg1Z3BlFtVmnw/tPFb HnnFidcp1bj9VMu0+mw/kNd3Fhy8TtjY6zA0g5uwvzpd9JGs2mpv9Gv7KDZiA0ig0s+Y upng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wClrywn5; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si10919464edc.67.2019.10.08.08.40.18; Tue, 08 Oct 2019 08:40:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wClrywn5; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728071AbfJHPkS (ORCPT + 13 others); Tue, 8 Oct 2019 11:40:18 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38277 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbfJHPkR (ORCPT ); Tue, 8 Oct 2019 11:40:17 -0400 Received: by mail-wm1-f67.google.com with SMTP id 3so3617990wmi.3 for ; Tue, 08 Oct 2019 08:40:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/vtISEtUshe9NBLXroiK2UL/EjV2n3/vwtTUKw/aRUg=; b=wClrywn5UcceOArqPVuFG5qra/XM6cZtX5DJAjrVEQ6P3d4L+EjGNzW/MpRKhBcIaG J9HsmQ0BProl6Vcac0VvkGjBaPy4j/I8j579RADXXKYnRJpVp/q1BF4cYTfKI7qyV1bd kzyj212cWgbL10r9YpsRYZVd9GEjmFpIoZCSKa4wo0j/PeCYLcArzdAc47nm3Zkzl50b 9Uz2LcEz/Oky1r9nEsJcBl5KVhiUSLNi6PlpwHg3lZjwmqg1KResZ6Py8GLN5dfxB9Qk hxtb9BaABS++wxkzCa0e3g2aflnAipyDYjz+THMbhRM+vGS+G6LZLbruSenT/0Jirqdx NXtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/vtISEtUshe9NBLXroiK2UL/EjV2n3/vwtTUKw/aRUg=; b=eITOSgWxn00+wUquZmf2APTGkUs3Jz+0y66tGKI8WDzq8q+haaDGF8cvh50GsKor3f OwwIuRTd2aO2B/O5Z+8cnqtIHJKG356F0JuXYlFmrKt3ojOvT63Ws/YaOBXtdrwcD5l5 9aW0ACszCVrKRkVjHdzRGDH9Dc760VsS/MDGY+Z2PQ2QNi9t0fM0TdtokO1B6woLGXTZ cT95aHZgv+CYanq11zGiMiB6wIzgMSSV9N7ueRrIK2JJBSvqRltkD++JVit5o/Keprp+ A2nEntQxWoHMQPdy2hYsPGYBScCUDXrxVQho7nSNK16hQJIlKSex4kNWA2iYLAXT5hYu WzVQ== X-Gm-Message-State: APjAAAWeHswlwUno5Do/EOpGHT9x41IQGdW3VScXiCE1hWcEu89fasdN Va7ZthxDUwmYbVSShHWLnaE36Q== X-Received: by 2002:a05:600c:2319:: with SMTP id 25mr4461682wmo.3.1570549215716; Tue, 08 Oct 2019 08:40:15 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id x16sm16784723wrl.32.2019.10.08.08.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 08:40:14 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: stable@vger.kernel.org, Mian Yousaf Kaukab , Jeremy Linton , Andre Przywara , Catalin Marinas , Stefan Wahren , Suzuki K Poulose , Will Deacon , Ard Biesheuvel Subject: [PATCH for-stable-v4.19 06/16] arm64: Add sysfs vulnerability show for spectre-v1 Date: Tue, 8 Oct 2019 17:39:20 +0200 Message-Id: <20191008153930.15386-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191008153930.15386-1-ard.biesheuvel@linaro.org> References: <20191008153930.15386-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mian Yousaf Kaukab [ Upstream commit 3891ebccace188af075ce143d8b072b65e90f695 ] spectre-v1 has been mitigated and the mitigation is always active. Report this to userspace via sysfs 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 Signed-off-by: Will Deacon Signed-off-by: Ard Biesheuvel --- 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 7fe3a60d1086..3758ba538a43 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -729,3 +729,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"); +}