diff options
Diffstat (limited to 'arch/arm64/mm/fault.c')
-rw-r--r-- | arch/arm64/mm/fault.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index c8c61b1eb479..9568c116ac7f 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -59,28 +59,6 @@ static inline const struct fault_info *esr_to_debug_fault_info(unsigned int esr) | |||
59 | return debug_fault_info + DBG_ESR_EVT(esr); | 59 | return debug_fault_info + DBG_ESR_EVT(esr); |
60 | } | 60 | } |
61 | 61 | ||
62 | #ifdef CONFIG_KPROBES | ||
63 | static inline int notify_page_fault(struct pt_regs *regs, unsigned int esr) | ||
64 | { | ||
65 | int ret = 0; | ||
66 | |||
67 | /* kprobe_running() needs smp_processor_id() */ | ||
68 | if (!user_mode(regs)) { | ||
69 | preempt_disable(); | ||
70 | if (kprobe_running() && kprobe_fault_handler(regs, esr)) | ||
71 | ret = 1; | ||
72 | preempt_enable(); | ||
73 | } | ||
74 | |||
75 | return ret; | ||
76 | } | ||
77 | #else | ||
78 | static inline int notify_page_fault(struct pt_regs *regs, unsigned int esr) | ||
79 | { | ||
80 | return 0; | ||
81 | } | ||
82 | #endif | ||
83 | |||
84 | static void data_abort_decode(unsigned int esr) | 62 | static void data_abort_decode(unsigned int esr) |
85 | { | 63 | { |
86 | pr_alert("Data abort info:\n"); | 64 | pr_alert("Data abort info:\n"); |
@@ -434,7 +412,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr, | |||
434 | unsigned long vm_flags = VM_READ | VM_WRITE; | 412 | unsigned long vm_flags = VM_READ | VM_WRITE; |
435 | unsigned int mm_flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; | 413 | unsigned int mm_flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; |
436 | 414 | ||
437 | if (notify_page_fault(regs, esr)) | 415 | if (kprobe_page_fault(regs, esr)) |
438 | return 0; | 416 | return 0; |
439 | 417 | ||
440 | /* | 418 | /* |