Ihor Solodrai says:
====================
selftests/bpf: Fixes for userspace ASAN
This series includes various fixes aiming to enable test_progs run
with userspace address sanitizer on BPF CI.
The first five patches add a simplified implementation of strscpy() to
selftests/bpf and then replace strcpy/strncpy usages across the tests
with it. See relevant discussions [1][2].
Patch #6 fixes the selftests/bpf/test_progs build with:
SAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
The subsequent patches fix bugs reported by the address sanitizer on
attempt to run the tests.
[1] https://lore.kernel.org/bpf/CAADnVQ+9uw2_o388j43EWiAPdMB=3FLx2jq-9zRSvqrv-wgRag@mail.gmail.com/
[2] https://lore.kernel.org/bpf/
20260220182011.802116-1-ihor.solodrai@linux.dev/
---
v3->v4:
- combine strscpy and ASAN series into one (Alexei)
- make the count arg of strscpy() optional via macro and fixup
relevant call sites (Alexei)
- remove strscpy_cat() from this series (Alexei)
v3: https://lore.kernel.org/bpf/
20260220222604.
1155148-1-ihor.solodrai@linux.dev/
v2->v3:
- rebase on top of "selftests/bpf: Add and use strscpy()"
- https://lore.kernel.org/bpf/
20260220182011.802116-1-ihor.solodrai@linux.dev/
- uprobe_multi_test.c: memset static struct child at the beginning
of a test *and* zero out child->thread in release_child (patch #9,
Mykyta)
- nits in test_sysctl.c (patch #11, Eduard)
- bpftool_helpers.c: update to use strscpy (patch #14, Alexei)
- add __asan_on_error handler to still dump test logs even with ASAN
build (patch #15, Mykyta)
v2: https://lore.kernel.org/bpf/
20260218003041.
1156774-1-ihor.solodrai@linux.dev/
v1->v2:
- rebase on bpf (v1 was targeting bpf-next)
- add ASAN flag handling in selftests/bpf/Makefile (Eduard)
- don't override SIGSEGV handler in test_progs with ASAN (Eduard)
- add error messages in detect_bpftool_path (Mykyta)
- various nits (Eduard, Jiri, Mykyta, Alexis)
v1: https://lore.kernel.org/bpf/
20260212011356.
3266753-1-ihor.solodrai@linux.dev/
====================
Link: https://patch.msgid.link/20260223190736.649171-1-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>