]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Reject stack arguments in non-JITed programs
authorYonghong Song <yonghong.song@linux.dev>
Wed, 13 May 2026 04:50:49 +0000 (21:50 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 13 May 2026 16:27:31 +0000 (09:27 -0700)
commitdc8f1cf6787c4bb1d8cabfac1e44d2d0ab435caa
tree8bfec0c7e43032524e82fcba3606ff4b214b3acc
parent2af4e792773f9fc05e5dbd5f297707cfe15cd817
bpf: Reject stack arguments in non-JITed programs

The interpreter does not understand the bpf register r11
(BPF_REG_PARAMS) used for stack arguments. So reject interpreter
usage if stack arguments are used either in the main program or
any subprogram.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260513045049.2390444-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/core.c
kernel/bpf/fixups.c