summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorNam Cao <namcaov@gmail.com>2023-08-21 17:57:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-28 20:20:13 +0300
commita08b414d1ecec1ddc22b2d87f5c189aab1b3097b (patch)
treedc19cb04c205bb12893539539596516f238ca7f5 /arch/riscv
parent7aa18f77e1c2075c06829efa9903c0962b2f954a (diff)
downloadlinux-a08b414d1ecec1ddc22b2d87f5c189aab1b3097b.tar.xz
riscv: put interrupt entries into .irqentry.text
commit 87615e95f6f9ccd36d4a3905a2d87f91967ea9d2 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/kernel/entry.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
index 3d11aa3af105..278d01d2911f 100644
--- a/arch/riscv/kernel/entry.S
+++ b/arch/riscv/kernel/entry.S
@@ -16,6 +16,8 @@
#include <asm/errata_list.h>
#include <linux/sizes.h>
+ .section .irqentry.text, "ax"
+
SYM_CODE_START(handle_exception)
/*
* If coming from userspace, preserve the user thread pointer and load