summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-02-03 19:21:12 +0100
committerOleg Nesterov <oleg@redhat.com>2013-02-08 18:28:04 +0100
commitbdf8647c44766590ed02f9a84a450a796558b753 (patch)
treefb3510335d4c1ce67e109df2f80eb26c67d8b589 /kernel/trace
parentf22c1bb6b4706be3502b378cb14564449b15f983 (diff)
downloadlinux-bdf8647c44766590ed02f9a84a450a796558b753.tar.gz
linux-bdf8647c44766590ed02f9a84a450a796558b753.tar.bz2
linux-bdf8647c44766590ed02f9a84a450a796558b753.zip
uprobes: Introduce uprobe_apply()
Currently it is not possible to change the filtering constraints after uprobe_register(), so a consumer can not, say, start to trace a task/mm which was previously filtered out, or remove the no longer needed bp's. Introduce uprobe_apply() which simply does register_for_each_vma() again to consult uprobe_consumer->filter() and install/remove the breakpoints. The only complication is that register_for_each_vma() can no longer assume that uprobe->consumers should be consulter if is_register == T, so we change it to accept "struct uprobe_consumer *new" instead. Unlike uprobe_register(), uprobe_apply(true) doesn't do "unregister" if register_for_each_vma() fails, it is up to caller to handle the error. Note: we probably need to cleanup the current interface, it is strange that uprobe_apply/unregister need inode/offset. We should either change uprobe_register() to return "struct uprobe *", or add a private ->uprobe member in uprobe_consumer. And in the long term uprobe_apply() should take a single argument, uprobe or consumer, even "bool add" should go away. Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/trace')
0 files changed, 0 insertions, 0 deletions