aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2014-04-17 17:16:44 +0900
committerIngo Molnar <[email protected]>2014-04-17 10:57:02 +0200
commit6381c24cd6d5d6373620426ab0a96c80ed953e20 (patch)
tree1ec21edeac1c0d940b35689ae79f45e95c7a4d7f /net/unix/af_unix.c
parent6ca2a88ad820af56535ed1e6936e0490cb6ec6dc (diff)
kprobes/x86: Fix page-fault handling logic
Current kprobes in-kernel page fault handler doesn't expect that its single-stepping can be interrupted by an NMI handler which may cause a page fault(e.g. perf with callback tracing). In that case, the page-fault handled by kprobes and it misunderstands the page-fault has been caused by the single-stepping code and tries to recover IP address to probed address. But the truth is the page-fault has been caused by the NMI handler, and do_page_fault failes to handle real page fault because the IP address is modified and causes Kernel BUGs like below. ---- [ 2264.726905] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 [ 2264.727190] IP: [<ffffffff813c46e0>] copy_user_generic_string+0x0/0x40 To handle this correctly, I fixed the kprobes fault handler to ensure the faulted ip address is its own single-step buffer instead of checking current kprobe state. Signed-off-by: Masami Hiramatsu <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Sandeepa Prabhu <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions