From patchwork Thu Oct 24 12:48:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 177458 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2142935ill; Thu, 24 Oct 2019 05:49:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqytNDOLJ2+skU7oi0maYplzP1GnRGTdMuHlXfswtfm054j8sZCyTgViAyG2b1xlAOe14Ds+ X-Received: by 2002:aa7:d145:: with SMTP id r5mr42373197edo.275.1571921389170; Thu, 24 Oct 2019 05:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571921389; cv=none; d=google.com; s=arc-20160816; b=GZBFd0JvuWdv1EfC1lXhcHaGfmiYOhv4t8HlDCSmmsEZykL23fUAC31scVzMN563O8 BM8EbEsMvjnJJ4njBoLHmlZ7OhPeZd7zwpGmB0vbPvnWCrF7IHYN//UtJ3EJAMjxySZC oSAeVu0KDtKRovaq0BNA6qQJ8pzq2/HbF86/Mn0NMyfsVtTwuW7+m8AGWYBuwiMCioO6 O240xpXkx66tpovRE8BoX+fvmBSGqVTJxoPFQEYQiodVbJl44fAkk8G7Dc2mUZn5bkyo lr/r4XROAIBzk1pKje9iAfwS1ZSVMVluBzwv2H7t8VDHr5j/wLU0ylEBBN8An4jdIMV1 Bj+Q== 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=kfWULgmJqd8T+PmSRMz5Rp543oTuaEBf6eIosbfBz94=; b=wf4ZNFgoSZZ662Z9CvGWeMuY+w2F6ZJDUjUMk0mnQzLXN+C+D7YY6M5HGu5fy3w69R I5fp9QuXFp57ePUSaqIeb7Zo8w5Q+hMKgjWEZGP6yDCWt4mdT+Z5t2Tak+7e9VqvGHsS Skd7Qf4cprMfFQhH8LfRYg/raUdrXyZIBECSOxxPohezn70UvEEziE/g3aApbnYGCGSA 541PjQRG5fzCD0PWkQAGmgU4IfQ/feAECi+83PSvZ5Lu5zGwJ2i8KitHE2/7B9ug6ZzZ 94qoPK5JYY4t17kVl5hRSByTW7myHlH7rewlTzpEx/BPoKzGkqaJlOyD4o02aUFGfby7 4sxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oCWnAebN; 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 f3si12973378eda.251.2019.10.24.05.49.48; Thu, 24 Oct 2019 05:49:49 -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=oCWnAebN; 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 S2502123AbfJXMts (ORCPT + 14 others); Thu, 24 Oct 2019 08:49:48 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38123 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502111AbfJXMts (ORCPT ); Thu, 24 Oct 2019 08:49:48 -0400 Received: by mail-wm1-f67.google.com with SMTP id 3so2487521wmi.3 for ; Thu, 24 Oct 2019 05:49:46 -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=kfWULgmJqd8T+PmSRMz5Rp543oTuaEBf6eIosbfBz94=; b=oCWnAebNBO44PY2QvXAVts9eL182XPqQaXBRuDpUmoqlO+skeTBW/5CkbW93x39d21 BTPQ/zgqWoCmoL+CbPmPJTKcYbA7na8r4vyvf4I8lceCO+FEp6IkrdS5T1q0HBRkMA2L jQaEcZ9ZVJGkwUdqvQJ6xmIIi30+aeBFwvS6O/nVjXIlBP0/Lb1xgM3Bf6u1PSgp5VSc 8Js/uJ2V1skjpYHqrSgTKZTTsbplmTDD2w3/pYc7eij6XAeqW7lFWKPckrLU7gDyOouI z8H4lK6n38paJOi2EN9tPkX0RRVi9+sna/89hpTj2u+IzaI2lV1HF2cAE8fYm577BsWP RcSA== 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=kfWULgmJqd8T+PmSRMz5Rp543oTuaEBf6eIosbfBz94=; b=NYjcQHpUi25cgFYc8LHPJadQc5Rlwd7H4Im5vlwO3sJveCcsfH5HU8/CJ7v6689sDg 3umhacM4iVg4EVs1DpwoBtoy92DKjNxJof0yDWGDkWyTb8ZvbSp3nQzqLcY9JS5U76wD C8kaAmv0Esry2a0Ph5LkWK7A2N7HI50FRH4ggOpVhJYjopSO3TeBDIuvtzXPNsGlsyaj X05F9XBFwmRqNphQEO5oOJY1Qf/nAsgp7/mkq2RpP+PzC+ooH2w6N3uSQuepvwbNLt/C NL2dl7UXJ4CBOo20zGgpFaHlXHutCbICm9rHMjd+tx0t+NWgqwrZ4LZprPnYjJomIk7U UBiQ== X-Gm-Message-State: APjAAAX1DRHjf/mC0yzzX8IiwP/QryIdY9JxZmFnyzo/L+f5MPL+4fzB QjYM2hzvITcHRATEztv28MV7I2h+qCEc563J X-Received: by 2002:a05:600c:228b:: with SMTP id 11mr4902465wmf.112.1571921385568; Thu, 24 Oct 2019 05:49:45 -0700 (PDT) Received: from localhost.localdomain (aaubervilliers-681-1-126-126.w90-88.abo.wanadoo.fr. [90.88.7.126]) by smtp.gmail.com with ESMTPSA id j22sm29111038wrd.41.2019.10.24.05.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 05:49:44 -0700 (PDT) From: Ard Biesheuvel To: stable@vger.kernel.org Cc: Ard Biesheuvel , Will Deacon , Catalin Marinas , Marc Zyngier , Mark Rutland , Suzuki K Poulose , Jeremy Linton , Andre Przywara , Alexandru Elisei , Mian Yousaf Kaukab , Stefan Wahren , Will Deacon Subject: [PATCH for-stable-4.14 36/48] arm64: Add sysfs vulnerability show for spectre-v1 Date: Thu, 24 Oct 2019 14:48:21 +0200 Message-Id: <20191024124833.4158-37-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191024124833.4158-1-ard.biesheuvel@linaro.org> References: <20191024124833.4158-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 105741487a86..8b0a141bd01d 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -638,3 +638,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"); +}