From patchwork Wed Oct 31 13:56:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 149799 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6826380ljp; Wed, 31 Oct 2018 06:57:23 -0700 (PDT) X-Received: by 2002:a67:3f96:: with SMTP id q22mr1331709vsi.1.1540994243540; Wed, 31 Oct 2018 06:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540994243; cv=none; d=google.com; s=arc-20160816; b=j7Dcz2lVeR8wRrpxR6uKJRkij2i0w8LOtFRRFPCAU5xhRhJKiUA0x65zMlOLX3AEvJ Ybn+KvjM5024evfEhsWRs+gjeIZYVrbdQL9YCgiOrsV+u02vctANaAKaT6jKQQGzqNde L2/zK6Cr9TBO/7r/qhbL7lbZ1430KS9L/n6u0cHLG+vNN1WJaNxw5O93dQ5GxmxPjZ9A PYOxOPxGGklaTficeJsg7FrGaH488Up+Ac7PwdrpPktRqNHW5gs8AlrNiF7oLrrnfkQ0 p0D1aSiVn2qFcIJFujmBpqtrMWmnoSlYCPF5ny2RF9bskTUe5fc4geexLAKsaDk/WWAy MRnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VsTOFUcZ+3bSgWLY/gphMhAUNgvi7bl1zA2jWn9hbr8=; b=QL/PAQbqEi7lKhB5RDi1zz5D8u8K7h05eBJUJeDekAky5JAOhE+g6H4IotMOPgDAy1 5NeOm2E95Un5DxiQYfrUT0I07vmWWGdjs7Ic+j7y51uZwKcQVXPV6JmrfUpyOKa9cCNj nVL8UHvXTWZYTUSSt8abI+OHUk97Q4v+wHX27DaLRde31wf3DVygR6B5QrsYAn13sFof 7BgVSrq5Eb7kG/RVEvkg75tdg1gP1HHseFkZlun98FZU5nluKfzUnD+Xf2gOQBMj82+s AuHle+jQRAwS5/0a2sMlzF58CvDSwSDbUtvuOx43vAmrIiubFPceHd3RGulmiWD9tHTd BTnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nl+eWdcz; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e18sor12565012uam.14.2018.10.31.06.57.23 for (Google Transport Security); Wed, 31 Oct 2018 06:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nl+eWdcz; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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; bh=VsTOFUcZ+3bSgWLY/gphMhAUNgvi7bl1zA2jWn9hbr8=; b=Nl+eWdcz46bvHs4tiASsglIHRseVQmWw0NxHmeofxVOMqvRjsFXUoPcPqjVXtdJkYY JR4uWuFH9iRLpmTmSYSAGJ36csLbY9ZDif+ai4Ah+S6UUn5js8JH66VDKO9hB1xog6CJ NY2Li3Ef0hTvi68RofiV+mRHl2Ly/UMHNkt9o= 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; bh=VsTOFUcZ+3bSgWLY/gphMhAUNgvi7bl1zA2jWn9hbr8=; b=jBZ4yGLLPNL2540uY84p0oCfy9fePVDhDbk4jfSzgwPN7XX6lt9uQALyCrufb/xoL1 LiOM/DIfiZJcD6F/Q5nq8iKEfXlNMp3PchlEJklrESty5AEKQN3UQuW+4YVjDxfnKPL0 AcUEw/p/8+PxhLY8L3IX8CGjrGHkMh+MW00JFatzFDhb5FxGHugmFcDmZpPOd6RQMeKP GUAwS9/Zg2Uuk1hsJRrqNVDSBJ/H7n3XDJX7jMXuQ+bQ7nmxjdz81DlQZNiziE4wXiMh e62l9fLT6hrA7S22CweIuHVfIN/MEbvIEFKkDE4dFZrbuIGtiIk650vuMHxIQxKyPKHX Dn4w== X-Gm-Message-State: AGRZ1gLDnowGIHesYjacWFHNOYHaDJDZp/gU+SQ3TtZq+l7Y1FtLAvcK ZHlJd/vIohPJx2RUu3WeRPZ0kyYJ X-Google-Smtp-Source: AJdET5e/AZqZJDnz9ApzeiJQvJc4cKAW1X3XU//tL2rq+gIzNK6EXTmNV7e9pYy1lnJw/+iHbQujiQ== X-Received: by 2002:ab0:481:: with SMTP id 1mr1363203uaw.59.1540994243074; Wed, 31 Oct 2018 06:57:23 -0700 (PDT) Return-Path: Received: from dave-Dell-System-XPS-L502X.hsd1.nh.comcast.net ([2603:3005:3403:7100:2c71:8680:34e1:a6aa]) by smtp.googlemail.com with ESMTPSA id s85-v6sm2275624vse.29.2018.10.31.06.57.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 06:57:22 -0700 (PDT) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Tony Lindgren , Marc Zyngier , Mark Rutland Cc: Greg KH , Mark Brown Subject: [PATCH 4.9 05/24] ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre Date: Wed, 31 Oct 2018 09:56:54 -0400 Message-Id: <20181031135713.2873-6-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031135713.2873-1-dave.long@linaro.org> References: <20181031135713.2873-1-dave.long@linaro.org> From: Russell King Commit c58d237d0852a57fde9bc2c310972e8f4e3d155d upstream. Add a Kconfig symbol for CPUs which are vulnerable to the Spectre attacks. Signed-off-by: Russell King Reviewed-by: Florian Fainelli Boot-tested-by: Tony Lindgren Reviewed-by: Tony Lindgren Acked-by: Marc Zyngier Signed-off-by: David A. Long --- arch/arm/mm/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index c1799dd1d0d9..d37af5e63411 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -396,6 +396,7 @@ config CPU_V7 select CPU_CP15_MPU if !MMU select CPU_HAS_ASID if MMU select CPU_PABRT_V7 + select CPU_SPECTRE if MMU select CPU_TLB_V7 if MMU # ARMv7M @@ -800,6 +801,9 @@ config CPU_BPREDICT_DISABLE help Say Y here to disable branch prediction. If unsure, say N. +config CPU_SPECTRE + bool + config TLS_REG_EMUL bool select NEED_KUSER_HELPERS