aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/kprobes/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/kprobes/core.c')
-rw-r--r--arch/x86/kernel/kprobes/core.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index b0d1e81c96bb..f72a47b602e2 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -1020,50 +1020,12 @@ int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
1020 */ 1020 */
1021 if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr)) 1021 if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
1022 return 1; 1022 return 1;
1023
1024 /*
1025 * In case the user-specified fault handler returned
1026 * zero, try to fix up.
1027 */
1028 if (fixup_exception(regs, trapnr))
1029 return 1;
1030
1031 /*
1032 * fixup routine could not handle it,
1033 * Let do_page_fault() fix it.
1034 */
1035 } 1023 }
1036 1024
1037 return 0; 1025 return 0;
1038} 1026}
1039NOKPROBE_SYMBOL(kprobe_fault_handler); 1027NOKPROBE_SYMBOL(kprobe_fault_handler);
1040 1028
1041/*
1042 * Wrapper routine for handling exceptions.
1043 */
1044int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val,
1045 void *data)
1046{
1047 struct die_args *args = data;
1048 int ret = NOTIFY_DONE;
1049
1050 if (args->regs && user_mode(args->regs))
1051 return ret;
1052
1053 if (val == DIE_GPF) {
1054 /*
1055 * To be potentially processing a kprobe fault and to
1056 * trust the result from kprobe_running(), we have
1057 * be non-preemptible.
1058 */
1059 if (!preemptible() && kprobe_running() &&
1060 kprobe_fault_handler(args->regs, args->trapnr))
1061 ret = NOTIFY_STOP;
1062 }
1063 return ret;
1064}
1065NOKPROBE_SYMBOL(kprobe_exceptions_notify);
1066
1067bool arch_within_kprobe_blacklist(unsigned long addr) 1029bool arch_within_kprobe_blacklist(unsigned long addr)
1068{ 1030{
1069 bool is_in_entry_trampoline_section = false; 1031 bool is_in_entry_trampoline_section = false;