]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Add test to ensure kprobe_multi is not sleepable
authorVarun R Mallya <varunrmallya@gmail.com>
Wed, 8 Apr 2026 19:01:37 +0000 (00:31 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 9 Apr 2026 01:15:56 +0000 (18:15 -0700)
commitc7cab53f9d5273f0cf2a26bdf178c4e074bdfb50
tree35bc78c048a8b305e7b8c5b8cd08e28d35d06f2b
parent4f64d5b66418b7f5967b7f7614d6107bb1fba705
selftests/bpf: Add test to ensure kprobe_multi is not sleepable

Add a selftest to ensure that kprobe_multi programs cannot be attached
using the BPF_F_SLEEPABLE flag. This test succeeds when the kernel
rejects attachment of kprobe_multi when the BPF_F_SLEEPABLE flag is set.

Suggested-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Varun R Mallya <varunrmallya@gmail.com>
Link: https://lore.kernel.org/r/20260408190137.101418-3-varunrmallya@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
tools/testing/selftests/bpf/progs/kprobe_multi_sleepable.c [new file with mode: 0644]