Skip to content

Commit

Permalink
bpf: check the bitset in match_binaries
Browse files Browse the repository at this point in the history
This commit adds a check in match_binaries that uses the bitset that is
tracked from parent to children, allowing to track children of a given
binary.

Signed-off-by: Kornilios Kourtis <[email protected]>
  • Loading branch information
kkourt committed Jul 23, 2024
1 parent 5933836 commit 72b1deb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bpf/process/types/basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,8 @@ FUNC_INLINE int match_binaries(__u32 selidx)

switch (selector_options->op) {
case op_filter_in:
if (current->bin.mb_bitset & (1UL<<selector_options->mbset_id))
return 1;
case op_filter_notin:
path_map = map_lookup_elem(&tg_mb_paths, &selidx);
if (!path_map)
Expand Down

0 comments on commit 72b1deb

Please sign in to comment.