]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
LoongArch: Show CPU vulnerabilites correctly
authorHuacai Chen <chenhuacai@loongson.cn>
Wed, 22 Apr 2026 07:45:12 +0000 (15:45 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 22 Apr 2026 07:45:12 +0000 (15:45 +0800)
commit37e57e8ad96cdec4a57b55fd10bef50f7370a954
tree232dbb182d407c172a6cbf5dddcc221547f99bc1
parent02a6a1f9d77a816fbac01de9bfcd0e0914552f2f
LoongArch: Show CPU vulnerabilites correctly

Most LoongArch processors are vulnerable to Spectre-V1 Proof-of-Concept
(PoC). And the generic mechanism, __user pointer sanitization, can be
used as a mitigation. This means to use array_index_nospec() to prevent
out of boundry access in syscall and other critical paths.

Implement the arch-specific cpu_show_spectre_v1() to show CPU Spectre-V1
vulnerabilites correctly.

Cc: stable@vger.kernel.org
Link: https://cc-sw.com/chinese-loongarch-architecture-evaluation-part-3-of-3/
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/cpu-probe.c