summaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorDavid A. Long <dave.long@linaro.org>2014-02-03 20:25:49 +0100
committerDavid A. Long <dave.long@linaro.org>2014-03-18 21:39:34 +0100
commit6fe50a28ba6e5fafb4a549dea666dd15297dd8bd (patch)
tree998f67b5bb336339c5308e000b0f8f5c9e97a44e /kernel/events
parentARM: Fix missing includes in kprobes sources (diff)
downloadlinux-6fe50a28ba6e5fafb4a549dea666dd15297dd8bd.tar.xz
linux-6fe50a28ba6e5fafb4a549dea666dd15297dd8bd.zip
uprobes: allow ignoring of probe hits
Allow arches to decided to ignore a probe hit. ARM will use this to only call handlers if the conditions to execute a conditionally executed instruction are satisfied. Signed-off-by: David A. Long <dave.long@linaro.org> Acked-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/uprobes.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 307d87c0991a..04709b66369d 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1804,6 +1804,11 @@ static bool handle_trampoline(struct pt_regs *regs)
return true;
}
+bool __weak arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs)
+{
+ return false;
+}
+
/*
* Run handler and ask thread to singlestep.
* Ensure all non-fatal signals cannot interrupt thread while it singlesteps.
@@ -1858,7 +1863,11 @@ static void handle_swbp(struct pt_regs *regs)
if (!get_utask())
goto out;
+ if (arch_uprobe_ignore(&uprobe->arch, regs))
+ goto out;
+
handler_chain(uprobe, regs);
+
if (can_skip_sstep(uprobe, regs))
goto out;