selftests/bpf: filter by pid to avoid cross-test interference#11311
selftests/bpf: filter by pid to avoid cross-test interference#11311kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
Conversation
|
Upstream branch: 6dd780f |
|
Upstream branch: 6dd780f |
a8346ee to
ac56ebe
Compare
59120bd to
94aca0b
Compare
|
Upstream branch: 099bded |
ac56ebe to
41c27cd
Compare
94aca0b to
980a66f
Compare
|
Upstream branch: bd2e02e |
41c27cd to
9e6fc51
Compare
980a66f to
026b5c1
Compare
|
Upstream branch: bd2e02e |
9e6fc51 to
3520d38
Compare
026b5c1 to
b72a510
Compare
|
Upstream branch: 0c55d48 |
3520d38 to
906c208
Compare
b72a510 to
ebefa82
Compare
The test installs a kprobe on __sys_connect and checks that bpf_probe_write_user() can modify the syscall argument. However, any concurrent thread in any other test that calls connect() will also trigger the kprobe and have its sockaddr silently overwritten, causing flaky failures in unrelated tests. Constrain the hook to the current test process by filtering on a PID stored as a global variable in .bss. Initialize the .bss value from user space before bpf_object__load() using bpf_map__set_initial_value(), and validate the bss map value size to catch layout mismatches. No new map is introduced and the test keeps the existing non-skeleton flow. Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com> Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
|
Upstream branch: e95e85b |
Patch 1/2 added PID filtering to the probe_user BPF program to avoid cross-test interference from the global connect() hooks. With the interference removed, drop the serial_ prefix and remove the stale TODO comment so the test can run in parallel. Tested: ./test_progs -t probe_user -v ./test_progs -j$(nproc) -t probe_user Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com> Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
906c208 to
5bef919
Compare
Pull request for series with
subject: selftests/bpf: filter by pid to avoid cross-test interference
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1062423