diff --git a/src/dcsnoop/dcsnoop.bpf.c b/src/dcsnoop/dcsnoop.bpf.c index f6513d0f6834a2f3146dda4a21979716bb3426d7..86e580969df31ce5db431ab228a15b2f4a1f1dbd 100644 --- a/src/dcsnoop/dcsnoop.bpf.c +++ b/src/dcsnoop/dcsnoop.bpf.c @@ -135,3 +135,25 @@ int BPF_KPROBE(lookup_fast_kprobe, struct nameidata *nd, struct path *path) { return trace_fast(ctx, nd, path); } + +SEC("fexit/d_lookup") +int BPF_PROG(d_lookup_fexit, const struct dentry *parent, + const struct qstr *name, struct dentry *ret) +{ + return fexit__d_lookup(ctx, parent, name, ret); +} + +SEC("kprobe/d_lookup") +int BPF_KPROBE(d_lookup_kprobe, const struct dentry *parent, + const struct qstr *name) +{ + return kprobe__d_lookup(ctx, parent, name); +} + +SEC("kretprobe/d_lookup") +int BPF_KRETPROBE(d_lookup_kretprobe, struct dentry *ret) +{ + return kretprobe__d_lookup(ctx, ret); +} + +char LICENSE[] SEC("license") = "GPL"; \ No newline at end of file