]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
riscv: put interrupt entries into .irqentry.text
authorNam Cao <namcaov@gmail.com>
Mon, 21 Aug 2023 14:57:09 +0000 (16:57 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 1 Nov 2023 02:15:56 +0000 (19:15 -0700)
The interrupt entries are expected to be in the .irqentry.text section.
For example, for kprobes to work properly, exception code cannot be
probed; this is ensured by blacklisting addresses in the .irqentry.text
section.

Fixes: 7db91e57a0ac ("RISC-V: Task implementation")
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/20230821145708.21270-1-namcaov@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/entry.S

index 143a2bb3e69760b00aebae5be78d08475f98792a..d7dd9030df3f8812056974fa474abcb07f82c297 100644 (file)
@@ -14,6 +14,8 @@
 #include <asm/asm-offsets.h>
 #include <asm/errata_list.h>
 
+       .section .irqentry.text, "ax"
+
 SYM_CODE_START(handle_exception)
        /*
         * If coming from userspace, preserve the user thread pointer and load