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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0C7A0C3ABB6 for ; Tue, 6 May 2025 00:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a1EGpE6Tr5Uxd83KJSIEXazaUCgQP/L3j8p/KsC7XX8=; b=XFjR+CnmVGaG+CSwmgT6oES9EO I2Yx5uCokbbERN00DPBX3atti/pf8nUOXe8R3c1UkyWjejR7IOw/ad3VbVuUKKlNi2p+R7qPDLmwj t0X7l5oWHcAUNGH54Fhv/H1n65YswcIxsQyRAFmjzTUNY93U9o8wCETKm2969pXNTH7MBHDEvjH/d 0hnPQ12jAbdp4w3nxzLiOVq7dP953/4jAzxc9wSdq5KOrPNRK1QxO6yxj4mlEHhV57BKe8nxEpRbU njmJG1tu9ud3q2meGULCoLkc/pKd4xfR1eOxXF1MrzzoGStZNrnHpHuWVPM5OPzEX/sQQpeWSTuNb CD1Owx9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uC6PL-00000009Lny-3x7Z; Tue, 06 May 2025 00:43:39 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uC4TV-00000008pCF-0avG for linux-arm-kernel@lists.infradead.org; Mon, 05 May 2025 22:39:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id CF6BEA4CCF0; Mon, 5 May 2025 22:34:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE08FC4CEE4; Mon, 5 May 2025 22:39:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746484788; bh=7rCN9i0L8S4jhJmbJNiRczApZlbspus7Wsbm//C51yo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pPo8pfohw6koU8xidAU1vYSqxoqpU46Q9fUtURLcgTAIRG2bkDDsdG+IEFQYCfLKJ g48WGIqCvmj/I7Hfvs3dJ3nUk73B9J3DzWZ0k/rDZVyFAYiWwoOUc73FnKuaDzb1hY 17ZxFyx+ex5dTMLhr2l/nr4YX1qdLVg+uHjLesnwcZzsdxPgrk2m6desDWOKmbSqKw UuzJMs6mytQCXdATKeknOagvzFIh9pLRMPEnwXrc5Wl4zNuk46beV2B124j/nh0TF6 HzWMwS9Enu2qLRe2dbcWO4ZdGC9/QZq87xHgWuwHs1HWK9muO0jOFKSREcJOt1nRl8 ZO/Jx8uRVggMA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jinqian Yang , Catalin Marinas , Sasha Levin , will@kernel.org, mark.rutland@arm.com, oliver.upton@linux.dev, shameerali.kolothum.thodi@huawei.com, dianders@chromium.org, maz@kernel.org, quic_tsoni@quicinc.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 6.12 014/486] arm64: Add support for HIP09 Spectre-BHB mitigation Date: Mon, 5 May 2025 18:31:30 -0400 Message-Id: <20250505223922.2682012-14-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250505223922.2682012-1-sashal@kernel.org> References: <20250505223922.2682012-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.12.26 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250505_153949_311865_B15AEA4C X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jinqian Yang [ Upstream commit e18c09b204e81702ea63b9f1a81ab003b72e3174 ] The HIP09 processor is vulnerable to the Spectre-BHB (Branch History Buffer) attack, which can be exploited to leak information through branch prediction side channels. This commit adds the MIDR of HIP09 to the list for software mitigation. Signed-off-by: Jinqian Yang Link: https://lore.kernel.org/r/20250325141900.2057314-1-yangjinqian1@huawei.com Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/proton-pack.c | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 2a4e686e633c6..3443e64adb4c3 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -131,6 +131,7 @@ #define FUJITSU_CPU_PART_A64FX 0x001 #define HISI_CPU_PART_TSV110 0xD01 +#define HISI_CPU_PART_HIP09 0xD02 #define APPLE_CPU_PART_M1_ICESTORM 0x022 #define APPLE_CPU_PART_M1_FIRESTORM 0x023 @@ -206,6 +207,7 @@ #define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL) #define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX) #define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110) +#define MIDR_HISI_HIP09 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP09) #define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM) #define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM) #define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO) diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index 0f51fd10b4b06..aaf6578c39ac4 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -901,6 +901,7 @@ static u8 spectre_bhb_loop_affected(void) MIDR_ALL_VERSIONS(MIDR_CORTEX_A77), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1), MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD), + MIDR_ALL_VERSIONS(MIDR_HISI_HIP09), {}, }; static const struct midr_range spectre_bhb_k11_list[] = { -- 2.39.5