summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSun Jian <sun.jian.kdev@gmail.com>2026-03-06 16:33:29 +0800
committerAlexei Starovoitov <ast@kernel.org>2026-03-11 09:34:22 -0700
commit70ce840d5f5bc7ae8a467c34a8fc15c1162ffee7 (patch)
treef3b32296bcea40a8201cf0df6dcd32f143073dce /tools/perf/scripts/python
parent900b7cc73ce9e6a1539d43f5c060c953f7eaf83b (diff)
selftests/bpf: filter by pid to avoid cross-test interference
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> Link: https://lore.kernel.org/r/20260306083330.518627-1-sun.jian.kdev@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions