diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/events/uprobes.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index a13251e8bfa4..3b02c72938a8 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
| @@ -1351,6 +1351,16 @@ unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs) | |||
| 1351 | return instruction_pointer(regs) - UPROBE_SWBP_INSN_SIZE; | 1351 | return instruction_pointer(regs) - UPROBE_SWBP_INSN_SIZE; |
| 1352 | } | 1352 | } |
| 1353 | 1353 | ||
| 1354 | unsigned long uprobe_get_trap_addr(struct pt_regs *regs) | ||
| 1355 | { | ||
| 1356 | struct uprobe_task *utask = current->utask; | ||
| 1357 | |||
| 1358 | if (unlikely(utask && utask->active_uprobe)) | ||
| 1359 | return utask->vaddr; | ||
| 1360 | |||
| 1361 | return instruction_pointer(regs); | ||
| 1362 | } | ||
| 1363 | |||
| 1354 | /* | 1364 | /* |
| 1355 | * Called with no locks held. | 1365 | * Called with no locks held. |
| 1356 | * Called in context of a exiting or a exec-ing thread. | 1366 | * Called in context of a exiting or a exec-ing thread. |
