Re: [PATCH v6 bpf-next 2/2] selftests/bpf: Add a kernel flag test for LSM bpf hook

Song Liu
2025-03-10T18:20:34Z

On Mon, Mar 10, 2025 at 11:11 AM Blaise Boscaccy
<bboscaccy@linux.microsoft.com> wrote:
[...]
> >
> > We are blindly blocking all security_bpf() with kernel=true here, so
> > any lskel load in parallel with this test may fail. On the other hand,
> > existing tests only block some operations under certain conditions.
> > For example, test_cgroup1_hierarchy.c only blocks operations for
> > target_ancestor_cgid.
> >
> > Does this make sense?
> >
>
> Not quite. This is only blocking security_bpf where kernel=true and
> pid=monitored_pid.

"test_progs -j" runs multiple threads within the process, so all the
threads are within monotored_pid.

Thanks,
Song