]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Add exception tests with stack arguments
authorYonghong Song <yonghong.song@linux.dev>
Sun, 17 May 2026 15:07:07 +0000 (08:07 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 17 May 2026 20:53:24 +0000 (13:53 -0700)
commit576482b55c19e7ec00e162a0fde4c4f1a95128c7
treeae1e6990df19016ceaae31b732355a56efa56bc7
parent18a37465b0ab5237a1d0ebf93a2a3b6a2da540b3
selftests/bpf: Add exception tests with stack arguments

Add tests to verify that bpf_throw() correctly unwinds the stack
when the program uses outgoing stack arguments (functions with >5
args). Without the preceding x86 fix, these tests crash the kernel
on x86 due to corrupted callee-saved register restore. There is
no change for arm64 to support exception with stack arguments.

Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260517150707.289273-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/exceptions.c
tools/testing/selftests/bpf/progs/exceptions.c