linux/arch/riscv
Alexandre Ghiti edf2d546bf
riscv: patch: Flush the icache right after patching to avoid illegal insns
We cannot delay the icache flush after patching some functions as we may
have patched a function that will get called before the icache flush.

The only way to completely avoid such scenario is by flushing the icache
as soon as we patch a function. This will probably be costly as we don't
batch the icache maintenance anymore.

Fixes: 6ca445d8af ("riscv: Fix early ftrace nop patching")
Reported-by: Conor Dooley <conor.dooley@microchip.com>
Closes: https://lore.kernel.org/linux-riscv/20240613-lubricant-breath-061192a9489a@wendy/
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Andy Chiu <andy.chiu@sifive.com>
Link: https://lore.kernel.org/r/20240624082141.153871-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-06-26 07:37:27 -07:00
..
boot riscv: dts: sophgo: disable write-protection for milkv duo 2024-06-19 08:46:03 +08:00
configs RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
crypto crypto: riscv - add vector crypto accelerated AES-CBC-CTS 2024-03-20 08:56:11 -07:00
errata RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
include RISC-V: fix vector insn load/store width mask 2024-06-25 08:47:10 -07:00
kernel riscv: patch: Flush the icache right after patching to avoid illegal insns 2024-06-26 07:37:27 -07:00
kvm RISC-V: KVM: Fix incorrect reg_subtype labels in kvm_riscv_vcpu_set_reg_isa_ext function 2024-05-31 10:40:39 +05:30
lib riscv: uaccess: Relax the threshold for fast path 2024-05-22 16:12:55 -07:00
mm Revert "riscv: mm: accelerate pagefault when badaccess" 2024-06-03 07:41:13 -07:00
net Modules changes for v6.10-rc1 2024-05-15 14:05:08 -07:00
purgatory Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools riscv: Check relocations at compile time 2023-04-19 07:46:32 -07:00
Kbuild RISC-V: hook new crypto subdir into build-system 2024-01-22 17:55:17 -08:00
Kconfig riscv: enable HAVE_ARCH_HUGE_VMAP for XIP kernel 2024-05-30 09:42:52 -07:00
Kconfig.debug riscv: Add tests for riscv module loading 2023-11-07 14:59:32 -08:00
Kconfig.errata riscv: thead: Rename T-Head PBMT to MAE 2024-04-25 10:22:33 -07:00
Kconfig.socs RISC-V: drop SOC_VIRT for ARCH_VIRT 2024-04-10 11:37:50 +01:00
Makefile RISC-V Patches for the 6.10 Merge Window, Part 2 2024-05-24 10:46:35 -07:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00