]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Don't override SIGSEGV handler with ASAN
authorIhor Solodrai <ihor.solodrai@linux.dev>
Mon, 23 Feb 2026 19:11:18 +0000 (11:11 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Feb 2026 16:19:49 +0000 (08:19 -0800)
commit4c9d07865c06bb9b9faff1ecf6c4b7cc8f7d67a9
treecd3d38f11037594bc8890c8b5aad1b7fcaa89a62
parenta2714e730304c79bf85d2178387255ef8348b897
selftests/bpf: Don't override SIGSEGV handler with ASAN

test_progs has custom SIGSEGV handler, which interferes with the
address sanitizer [1]. Add an #ifndef to avoid this.

Additionally, declare an __asan_on_error() to dump the test logs in
the same way it happens in the custom SIGSEGV handler.

[1] https://lore.kernel.org/bpf/73d832948b01dbc0ebc60d85574bdf8537f3a810.camel@gmail.com/

Acked-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260223191118.655185-3-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_progs.c