Received: by 10.192.165.156 with SMTP id m28csp240058imm; Tue, 17 Apr 2018 09:20:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ef/vsG7WEe7w+YM/K6rGBUIvv1P0dtdh0tKFX7OB7Q33ncw8OlBEHLspu6a24XG2p6wMY X-Received: by 2002:a17:902:6e8f:: with SMTP id v15-v6mr2684774plk.245.1523982015352; Tue, 17 Apr 2018 09:20:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523982015; cv=none; d=google.com; s=arc-20160816; b=WXCsAC2XfzSbNmufuKPo+LZ4Lb77n5C/ZQ5364oRg5ttwBebRO51QifHSdql0Kw1CF huMtcJmZEQGBM0ljwDVsYOYBIhLKJyoqaUSDDiKJTRnlkqGEfAjl0XSd6lwICJWpQTtj NbtdUGX3E0ldmBB/8cvgycb2aIm71inQ2QOaCOduQ6Gwa6XDAI0wbF1KBX65zHALeb74 4X/bbsLS6Uj7/TAbFqdPn/AF0py2+j3BYNqmRf4z/ooHQyzQ6s0qfB3k4xyiz4rP6gj3 m8XmA68RbppYG/5K9duJZwRZ6qH7k4n3BJRgvz89E4epqwvSRhNmKadzvEBnvy+TFXhU jJ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Clal5mOmSIUY1/XLZb4vuYzibPiUKoFO1CJg2/DnttA=; b=oRboDVqIHXauL+xkg1firYWXMTlpKRBau4BP0NRlttdY4MGcskaRCRj+j4xI4kIaE4 lhnQ7xYUKpNwF0ufWJCvUoKUCfP9UA4R+BBrpsDDFmCvsoA/cuv73vPHClSu+2AjquSE hecD+/EurWKVoWxkGo4lp5OH4bu/2XPSD+pC6Mo9goWF/6TvPj2vZiBWopB2VSgtgHbX NxYfSbDjbzQfxCTgVonwPi9iI887RfkwqsUQINVOQkrtFmJ3Uw/kMz7I23KHwzJ7E4eL x+Aa1HP+xm4BP+wCVNvFf7a86Jd/J89C3jPzacUnkxaG6ev6ADa7G6g+7aWa1+QJZcWC v+Ig== 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 p8-v6si5022674pls.86.2018.04.17.09.20.01; Tue, 17 Apr 2018 09:20:15 -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 S1754763AbeDQQSK (ORCPT + 99 others); Tue, 17 Apr 2018 12:18:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36452 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755860AbeDQQKe (ORCPT ); Tue, 17 Apr 2018 12:10:34 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0622ED2D; Tue, 17 Apr 2018 16:10:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Will Deacon , Jayachandran C , Catalin Marinas , Greg Hackmann , Mark Rutland Subject: [PATCH 4.9 34/66] arm64: Branch predictor hardening for Cavium ThunderX2 Date: Tue, 17 Apr 2018 17:59:07 +0200 Message-Id: <20180417155647.352640375@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155645.868055442@linuxfoundation.org> References: <20180417155645.868055442@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mark Rutland From: Jayachandran C commit f3d795d9b360523beca6d13ba64c2c532f601149 upstream. Use PSCI based mitigation for speculative execution attacks targeting the branch predictor. We use the same mechanism as the one used for Cortex-A CPUs, we expect the PSCI version call to have a side effect of clearing the BTBs. Acked-by: Will Deacon Signed-off-by: Jayachandran C Signed-off-by: Catalin Marinas Signed-off-by: Mark Rutland [v4.9 backport] Tested-by: Greg Hackmann Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpu_errata.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -252,6 +252,16 @@ const struct arm64_cpu_capabilities arm6 MIDR_ALL_VERSIONS(MIDR_CORTEX_A75), .enable = enable_psci_bp_hardening, }, + { + .capability = ARM64_HARDEN_BRANCH_PREDICTOR, + MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN), + .enable = enable_psci_bp_hardening, + }, + { + .capability = ARM64_HARDEN_BRANCH_PREDICTOR, + MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2), + .enable = enable_psci_bp_hardening, + }, #endif { }