]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: Add support for HIP09 Spectre-BHB mitigation
authorJinqian Yang <yangjinqian1@huawei.com>
Tue, 25 Mar 2025 14:19:00 +0000 (22:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:24 +0000 (11:12 +0200)
[ 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 <yangjinqian1@huawei.com>
Link: https://lore.kernel.org/r/20250325141900.2057314-1-yangjinqian1@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/include/asm/cputype.h
arch/arm64/kernel/proton-pack.c

index 8c6bd9da3b1ba3beb4d9bbcc54e735044e434bad..3381fdc081ad2a4e5ffaa263f5ef5d672c0fd6f2 100644 (file)
 #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
 #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)
index 8ef3335ecff722eab01cbc7e1600e8aeb3695839..31eaf15d2079a4e6030478a59b7ad2182aeceb80 100644 (file)
@@ -904,6 +904,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[] = {