diff --git a/observation/src/biosnoop/biosnoop.bpf.c b/observation/src/biosnoop/biosnoop.bpf.c index b95cd0ea9a321768eb536fe6d9f31849554fdf94..56d3ee4f3c69ece971fee02c5ee4d2dcd6e6d44f 100644 --- a/observation/src/biosnoop/biosnoop.bpf.c +++ b/observation/src/biosnoop/biosnoop.bpf.c @@ -71,4 +71,26 @@ int BPF_PROG(blk_account_io_start, struct request *rq) return 0; return trace_pid(rq); -} \ No newline at end of file +<<<<<<< Updated upstream +} +======= +} + +SEC("kprobe/blk_account_io_start") +int BPF_KPROBE(kprobe_blk_account_io_start, struct request *rq) +{ + if (filter_memcg && !bpf_current_task_under_cgroup(&cgroup_map, 0)) + return 0; + + return trace_pid(rq); +} + +SEC("kprobe/blk_account_io_merge_bio") +int BPF_KPROBE(blk_account_io_merge_bio, struct request *rq) +{ + if (filter_memcg && !bpf_current_task_under_cgroup(&cgroup_map, 0)) + return 0; + + return trace_pid(rq); +} +>>>>>>> Stashed changes