From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E059CC2D0C6 for ; Wed, 11 Dec 2019 16:01:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AC3432073D for ; Wed, 11 Dec 2019 16:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576080076; bh=lQByssjgqWaVZWGX1nyIVM5aR1JZ2it8lsG75l/CR1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lWcVs5xRIZtaSr5QK/6f+DKAbqO1r75qVif3u7f73pvsK2JqS3yTJl6J8Z4LH57ja yLb4AvJBwRLJABC191PmHfNdi3mKb0/WjflLhu8Gw3GrwMD+RtouqqKe3rUL3OU/7U yM7M/8HBoog0bhgS61qAYp9PfxU4DwQMBTG4RQWI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731445AbfLKPNe (ORCPT ); Wed, 11 Dec 2019 10:13:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:36546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730702AbfLKPNS (ORCPT ); Wed, 11 Dec 2019 10:13:18 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AFBAC20663; Wed, 11 Dec 2019 15:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077197; bh=lQByssjgqWaVZWGX1nyIVM5aR1JZ2it8lsG75l/CR1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vRkva60YWAM8rlvbEsJpl3rjVa12nPHZ97qi+aeDDvw5fbZ+pSttTPc+2c0NrYimq tnPi8mQf9sOyMZCRuShQzq1j2S05gkZm2R1XEq43bRbZSMDcCg13GC0F2uJx0seOlr 9LXGrM/8/FmOwb5BiAn6PvnMVJFZCh2VL/wD9nng= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Doug Berger , Florian Fainelli , Russell King , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 080/134] ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening Date: Wed, 11 Dec 2019 10:10:56 -0500 Message-Id: <20191211151150.19073-80-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191211151150.19073-1-sashal@kernel.org> References: <20191211151150.19073-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Doug Berger [ Upstream commit 4ae5061a19b550dfe25397843427ed2ebab16b16 ] When the default processor handling was added to the function cpu_v7_spectre_init() it only excluded other ARM implemented processor cores. The Broadcom Brahma B53 core is not implemented by ARM so it ended up falling through into the set of processors that attempt to use the ARM_SMCCC_ARCH_WORKAROUND_1 service to harden the branch predictor. Since this workaround is not necessary for the Brahma-B53 this commit explicitly checks for it and prevents it from applying a branch predictor hardening workaround. Fixes: 10115105cb3a ("ARM: spectre-v2: add firmware based hardening") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/mm/proc-v7-bugs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mm/proc-v7-bugs.c b/arch/arm/mm/proc-v7-bugs.c index 9a07916af8dd2..a6554fdb56c54 100644 --- a/arch/arm/mm/proc-v7-bugs.c +++ b/arch/arm/mm/proc-v7-bugs.c @@ -65,6 +65,9 @@ static void cpu_v7_spectre_init(void) break; #ifdef CONFIG_ARM_PSCI + case ARM_CPU_PART_BRAHMA_B53: + /* Requires no workaround */ + break; default: /* Other ARM CPUs require no workaround */ if (read_cpuid_implementor() == ARM_CPU_IMP_ARM) -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73022C2D0C7 for ; Wed, 11 Dec 2019 15:13:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48B5424683 for ; Wed, 11 Dec 2019 15:13:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o77ZNIL3"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="vRkva60Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48B5424683 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RPVQQ7pMJ0vPrJ7nAUEHcLNeWz/gYNfAp7auKvTbBUA=; b=o77ZNIL35jZgns Zcg8+qWmbkoX/scw9B5F0TNr8l25U8EXSFwOQNVwQrpSQ8WbJ/62eBtZEEPmhm/S2OAnpHgtcbaS2 IbVRLU/JAgY56+ok0a1nLXnu7kC6ePTP60WPQW0U93rj760pDohQ4vOJNqpiqdgtgki1lUVcWFwl5 KA/WG8w/yeVvyz1Cx+cKLn9hDtSCLdAB8gl0JtreVKccHagt49jIFH6GgVXP0r+/f0uqe3BWuO7Eo mQQoXG99lxnT4kiyG0xs7kxStj2oEWHqo9dyel/32ENQXrBy/ZTN0upWKR+2XlNiNfKRHo8b/E/x9 4j3+f++nFAp46PzmD9ZA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1if3g5-0003U0-Vg; Wed, 11 Dec 2019 15:13:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1if3fx-0003Og-Ok for linux-arm-kernel@lists.infradead.org; Wed, 11 Dec 2019 15:13:19 +0000 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AFBAC20663; Wed, 11 Dec 2019 15:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077197; bh=lQByssjgqWaVZWGX1nyIVM5aR1JZ2it8lsG75l/CR1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vRkva60YWAM8rlvbEsJpl3rjVa12nPHZ97qi+aeDDvw5fbZ+pSttTPc+2c0NrYimq tnPi8mQf9sOyMZCRuShQzq1j2S05gkZm2R1XEq43bRbZSMDcCg13GC0F2uJx0seOlr 9LXGrM/8/FmOwb5BiAn6PvnMVJFZCh2VL/wD9nng= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 080/134] ARM: 8937/1: spectre-v2: remove Brahma-B53 from hardening Date: Wed, 11 Dec 2019 10:10:56 -0500 Message-Id: <20191211151150.19073-80-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191211151150.19073-1-sashal@kernel.org> References: <20191211151150.19073-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191211_071317_842051_D53C55CE X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Florian Fainelli , Russell King , Doug Berger , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Doug Berger [ Upstream commit 4ae5061a19b550dfe25397843427ed2ebab16b16 ] When the default processor handling was added to the function cpu_v7_spectre_init() it only excluded other ARM implemented processor cores. The Broadcom Brahma B53 core is not implemented by ARM so it ended up falling through into the set of processors that attempt to use the ARM_SMCCC_ARCH_WORKAROUND_1 service to harden the branch predictor. Since this workaround is not necessary for the Brahma-B53 this commit explicitly checks for it and prevents it from applying a branch predictor hardening workaround. Fixes: 10115105cb3a ("ARM: spectre-v2: add firmware based hardening") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/mm/proc-v7-bugs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mm/proc-v7-bugs.c b/arch/arm/mm/proc-v7-bugs.c index 9a07916af8dd2..a6554fdb56c54 100644 --- a/arch/arm/mm/proc-v7-bugs.c +++ b/arch/arm/mm/proc-v7-bugs.c @@ -65,6 +65,9 @@ static void cpu_v7_spectre_init(void) break; #ifdef CONFIG_ARM_PSCI + case ARM_CPU_PART_BRAHMA_B53: + /* Requires no workaround */ + break; default: /* Other ARM CPUs require no workaround */ if (read_cpuid_implementor() == ARM_CPU_IMP_ARM) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel