]> git.baikalelectronics.ru Git - kernel.git/commitdiff
riscv: add do_page_fault and do_trap_break into the kprobes blacklist
authorJisheng Zhang <jszhang@kernel.org>
Mon, 29 Mar 2021 18:12:26 +0000 (02:12 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 16 Apr 2021 04:32:28 +0000 (21:32 -0700)
These two functions are used to implement the kprobes feature so they
can't be kprobed.

Fixes: fd6ce03925e1 ("riscv: Add kprobes supported")
Cc: stable@vger.kernel.org
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/traps.c
arch/riscv/mm/fault.c

index 0879b5df11b92c21a10e5b796618a72ba2934fdd..1357abf79570a07fe67a57c8890e08c3a4db4a91 100644 (file)
@@ -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)
index 8f17519208c756b7a08bf089ec53004c8a5b0c89..c5dbd55cbf7cdfc0638080981f1e7487fcee99c8 100644 (file)
@@ -328,3 +328,4 @@ good_area:
        }
        return;
 }
+NOKPROBE_SYMBOL(do_page_fault);