Skip to content

Commit 0e3f364

Browse files
Jinjie Ruanpalmer-dabbelt
authored andcommitted
riscv: Enable generic CPU vulnerabilites support
Currently x86, ARM and ARM64 support generic CPU vulnerabilites, but RISC-V not, such as: # cd /sys/devices/system/cpu/vulnerabilities/ x86: # cat spec_store_bypass Mitigation: Speculative Store Bypass disabled via prctl and seccomp # cat meltdown Not affected ARM64: # cat spec_store_bypass Mitigation: Speculative Store Bypass disabled via prctl and seccomp # cat meltdown Mitigation: PTI RISC-V: # cat /sys/devices/system/cpu/vulnerabilities # ... No such file or directory As SiFive RISC-V Core IP offerings are not affected by Meltdown and Spectre, it can use the default weak function as below: # cat spec_store_bypass Not affected # cat meltdown Not affected Link: https://www.sifive.cn/blog/sifive-statement-on-meltdown-and-spectre Signed-off-by: Jinjie Ruan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent c6ebf2c commit 0e3f364

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ config RISCV
9292
select GENERIC_ATOMIC64 if !64BIT
9393
select GENERIC_CLOCKEVENTS_BROADCAST if SMP
9494
select GENERIC_CPU_DEVICES
95+
select GENERIC_CPU_VULNERABILITIES
9596
select GENERIC_EARLY_IOREMAP
9697
select GENERIC_ENTRY
9798
select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO

0 commit comments

Comments
 (0)