diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-12-30 09:54:08 -0500 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2013-02-08 11:47:11 -0500 |
commit | 74e59dfc6b19e3472a7c16ad57bc831e6e647895 (patch) | |
tree | 5047f177b6c604f83d4b9f62614acf93a08d34bd /kernel/trace | |
parent | cf31ec3f7fece93f3fce3ee5964e27857141ea47 (diff) |
uprobes: Change handle_swbp() to expose bp_vaddr to handler_chain()
Change handle_swbp() to set regs->ip = bp_vaddr in advance, this is
what consumer->handler() needs but uprobe_get_swbp_addr() is not
exported.
This also simplifies the code and makes it more consistent across
the supported architectures. handle_swbp() becomes the only caller
of uprobe_get_swbp_addr().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_uprobe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index e668024773d4..17d9b2bcc28d 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c | |||
@@ -492,7 +492,7 @@ static void uprobe_trace_func(struct trace_uprobe *tu, struct pt_regs *regs) | |||
492 | return; | 492 | return; |
493 | 493 | ||
494 | entry = ring_buffer_event_data(event); | 494 | entry = ring_buffer_event_data(event); |
495 | entry->ip = uprobe_get_swbp_addr(task_pt_regs(current)); | 495 | entry->ip = instruction_pointer(task_pt_regs(current)); |
496 | data = (u8 *)&entry[1]; | 496 | data = (u8 *)&entry[1]; |
497 | for (i = 0; i < tu->nr_args; i++) | 497 | for (i = 0; i < tu->nr_args; i++) |
498 | call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset); | 498 | call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset); |
@@ -667,7 +667,7 @@ static void uprobe_perf_func(struct trace_uprobe *tu, struct pt_regs *regs) | |||
667 | if (!entry) | 667 | if (!entry) |
668 | goto out; | 668 | goto out; |
669 | 669 | ||
670 | entry->ip = uprobe_get_swbp_addr(task_pt_regs(current)); | 670 | entry->ip = instruction_pointer(task_pt_regs(current)); |
671 | data = (u8 *)&entry[1]; | 671 | data = (u8 *)&entry[1]; |
672 | for (i = 0; i < tu->nr_args; i++) | 672 | for (i = 0; i < tu->nr_args; i++) |
673 | call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset); | 673 | call_fetch(&tu->args[i].fetch, regs, data + tu->args[i].offset); |