]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: correct stack liveness for tail calls
authorEduard Zingerman <eddyz87@gmail.com>
Wed, 19 Nov 2025 16:03:54 +0000 (17:03 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 22 Nov 2025 01:45:30 +0000 (17:45 -0800)
commite40f5a6bf88a781d5f81bc6b8aab9ac31d8c98dd
treeee388231d3516c87fe8bae96623e6b4756537c6c
parent978da762ea4517da1f4c270eb95bc289f81c176a
bpf: correct stack liveness for tail calls

This updates bpf_insn_successors() reflecting that control flow might
jump over the instructions between tail call and function exit, verifier
might assume that some writes to parent stack always happen, which is
not the case.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Martin Teichmann <martin.teichmann@xfel.eu>
Link: https://lore.kernel.org/r/20251119160355.1160932-4-martin.teichmann@xfel.eu
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf_verifier.h
kernel/bpf/liveness.c
kernel/bpf/verifier.c