riscv: add do_page_fault and do_trap_break into the kprobes blacklist
PATCH 1/1 riscv: add do_page_fault and do_trap_break into the kprobes blacklist
From: Jisheng Zhang <[email protected]>
These two functions are used to implement the kprobes feature so they can't be kprobed.
Fixes c22b0bcb1dd0 ("riscv: Add kprobes supported")
Signed-off-by Jisheng Zhang <[email protected]>
--- arch/riscv/kernel/traps.c | 1 + arch/riscv/mm/fault.c | 1 + 2 files changed, 2 insertions(+)
arch/riscv/kernel/traps.c +1 -0
@@ -178,6 +178,7 @@ asmlinkage __visible void do_trap_break(struct pt_regs *regs)else die (regs,"Kernel BUG" ); } +NOKPROBE_SYMBOL (do_trap_break);#ifdef CONFIG_GENERIC_BUG int is_valid_bugaddr (unsigned long pc)
arch/riscv/mm/fault.c +1 -0
@@ -328,3 +328,4 @@ asmlinkage void do_page_fault(struct pt_regs *regs) }return ; } +NOKPROBE_SYMBOL (do_page_fault);
Signature · 1 line
2.31.0
Quoted 5 lines · On Tue, 30 Mar 2021 02:12:26 +0800 Jisheng Zhang <[email protected]>…
From: Jisheng Zhang <[email protected]>
These two functions are used to implement the kprobes feature so they can't be kprobed.
Looks good to me.
Reviewed-by Masami Hiramatsu <[email protected]>
Thanks,
Quoted 32 lines
Fixes c22b0bcb1dd0 ("riscv: Add kprobes supported")Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/kernel/traps.c | 1 + arch/riscv/mm/fault.c | 1 + 2 files changed, 2 insertions(+)arch/riscv/kernel/traps.c +1
-0@@ -178,6 +178,7 @@ asmlinkage __visible void do_trap_break(struct pt_regs *regs)else die (regs,"Kernel BUG" ); } +NOKPROBE_SYMBOL (do_trap_break);#ifdef CONFIG_GENERIC_BUG int is_valid_bugaddr (unsigned long pc)arch/riscv/mm/fault.c +1
-0@@ -328,3 +328,4 @@ asmlinkage void do_page_fault(struct pt_regs *regs) }return ; } +NOKPROBE_SYMBOL (do_page_fault);Signature · 1 line
2.31.0
Signature · 6 lines
Masami Hiramatsu <[email protected]> _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
maintainerQuoted 29 lines · On Mon, 29 Mar 2021 11:12:26 PDT (-0700), [email protected] wrote:
From: Jisheng Zhang <[email protected]>
These two functions are used to implement the kprobes feature so they can't be kprobed.
Fixes c22b0bcb1dd0 ("riscv: Add kprobes supported")Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/kernel/traps.c | 1 + arch/riscv/mm/fault.c | 1 + 2 files changed, 2 insertions(+)arch/riscv/kernel/traps.c +1
-0@@ -178,6 +178,7 @@ asmlinkage __visible void do_trap_break(struct pt_regs *regs)else die (regs,"Kernel BUG" ); } +NOKPROBE_SYMBOL (do_trap_break);#ifdef CONFIG_GENERIC_BUG int is_valid_bugaddr (unsigned long pc)arch/riscv/mm/fault.c +0
-0
arch/riscv/mm/fault.c asmlinkage void do_page_fault(struct pt_regs *regs) · line 331
Quoted 4 lines
arch/riscv/mm/fault.c +1
-0@@ -328,3 +328,4 @@ asmlinkage void do_page_fault(struct pt_regs *regs) }return ; } +NOKPROBE_SYMBOL (do_page_fault);
Thanks, this is on fixes.