linux-stable/arch/riscv/kernel
Guo Ren 74abe5a39d
riscv: Disable Vector Instructions for kernel itself
Disable vector instructions execution for kernel mode at its entrances.
This helps find illegal uses of vector in the kernel space, which is
similar to the fpu.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Co-developed-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Co-developed-by: Han-Kuan Chen <hankuan.chen@sifive.com>
Signed-off-by: Han-Kuan Chen <hankuan.chen@sifive.com>
Co-developed-by: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: Greentime Hu <greentime.hu@sifive.com>
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
Tested-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20230605110724.21391-7-andy.chiu@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-06-08 07:16:39 -07:00
..
compat_vdso RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
pi riscv: Allow to downgrade paging mode from the command line 2023-04-26 07:30:52 -07:00
probes RISC-V Patches for the 6.3 Merge Window, Part 1 2023-02-25 11:14:08 -08:00
vdso RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
.gitignore
alternative.c RISC-V: hwprobe: Remove __init on probe_vendor_features() 2023-04-25 21:58:42 -07:00
asm-offsets.c RISC-V: Add arch functions to support hibernation/suspend-to-disk 2023-04-29 11:25:13 -07:00
cacheinfo.c RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
compat_signal.c
compat_syscall_table.c
cpu-hotplug.c Objtool changes for v6.4: 2023-04-28 14:02:54 -07:00
cpu.c KVM/riscv changes for 6.4 2023-05-05 06:11:48 -04:00
cpu_ops.c RISC-V: Align SBI probe implementation with spec 2023-04-29 13:04:50 -07:00
cpu_ops_sbi.c
cpu_ops_spinwait.c
cpufeature.c riscv: Extending cpufeature.c to detect V-extension 2023-06-08 07:16:35 -07:00
crash_core.c RISC-V: Add arch_crash_save_vmcoreinfo support 2022-12-02 16:48:22 -08:00
crash_dump.c
crash_save_regs.S
efi-header.S riscv: Prepare EFI header for relocatable kernels 2023-04-19 07:46:28 -07:00
efi.c efi: Discover BTI support in runtime services regions 2023-02-04 09:19:02 +01:00
elf_kexec.c RISC-V: kexec: Fix memory leak of elf header buffer 2022-12-05 10:59:58 -08:00
entry.S riscv: Disable Vector Instructions for kernel itself 2023-06-08 07:16:39 -07:00
fpu.S
ftrace.c RISC-V: Don't check text_mutex during stop_machine 2023-03-09 14:58:51 -08:00
head.h riscv: entry: Convert to generic entry 2023-03-23 08:47:00 -07:00
head.S riscv: Disable Vector Instructions for kernel itself 2023-06-08 07:16:39 -07:00
hibernate-asm.S RISC-V: Add arch functions to support hibernation/suspend-to-disk 2023-04-29 11:25:13 -07:00
hibernate.c RISC-V: Add arch functions to support hibernation/suspend-to-disk 2023-04-29 11:25:13 -07:00
image-vars.h riscv: Fix EFI stub usage of KASAN instrumented strcmp function 2023-04-19 07:24:52 -07:00
irq.c RISC-V: Treat IPIs as normal Linux IRQs 2023-04-08 11:26:24 +01:00
jump_label.c
kexec_relocate.S
kgdb.c RISC-V: rename parse_asm.h to insn.h 2022-12-29 06:59:47 -08:00
machine_kexec.c riscv: kexec: Fixup crash_smp_send_stop without multi cores 2022-11-29 21:50:59 -08:00
machine_kexec_file.c
Makefile riscv: compat_syscall_table: Fixup compile warning 2023-05-01 15:42:34 -07:00
mcount-dyn.S riscv: entry: Consolidate general regs saving/restoring 2023-03-23 08:47:03 -07:00
mcount.S RISC-V: preserve a1 in mcount 2022-12-02 10:04:37 -08:00
module-sections.c
module.c riscv: module: Add ADD16 and SUB16 rela types 2023-01-31 23:29:40 -08:00
patch.c RISC-V: Don't check text_mutex during stop_machine 2023-03-09 14:58:51 -08:00
perf_callchain.c
perf_regs.c
process.c riscv: entry: Consolidate ret_from_kernel_thread into ret_from_fork 2023-03-23 08:47:02 -07:00
ptrace.c riscv: entry: Convert to generic entry 2023-03-23 08:47:00 -07:00
reset.c
riscv_ksyms.c RISC-V: add infrastructure to allow different str* implementations 2023-01-31 11:43:23 -08:00
sbi-ipi.c RISC-V: Allow marking IPIs as suitable for remote FENCEs 2023-04-08 11:26:24 +01:00
sbi.c RISC-V: Align SBI probe implementation with spec 2023-04-29 13:04:50 -07:00
setup.c RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
signal.c RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
smp.c SMP cross-CPU function-call updates for v6.4: 2023-04-28 15:03:43 -07:00
smpboot.c RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
soc.c
stacktrace.c riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode 2023-03-09 14:50:35 -08:00
suspend.c RISC-V: Change suspend_save_csrs and suspend_restore_csrs to public function 2023-04-29 11:25:10 -07:00
suspend_entry.S RISC-V: Factor out common code of __cpu_resume_enter() 2023-04-29 11:25:11 -07:00
sys_riscv.c riscv: hwprobe: Add support for probing V in RISCV_HWPROBE_KEY_IMA_EXT_0 2023-06-08 07:16:36 -07:00
syscall_table.c
time.c clocksource/drivers/riscv: Get rid of clocksource_arch_init() callback 2023-02-13 13:10:17 +01:00
traps.c riscv: entry: Save a0 prior syscall_enter_from_user_mode() 2023-04-11 08:25:29 -07:00
traps_misaligned.c
vdso.c RISC-V: Add hwprobe vDSO function and data 2023-04-18 15:48:18 -07:00
vmlinux-xip.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
vmlinux.lds.S riscv: Move .rela.dyn to the init sections 2023-05-01 17:00:32 -07:00