]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Fix arg_track_join log to use sa prefix for stack arg slots
authorYonghong Song <yonghong.song@linux.dev>
Fri, 15 May 2026 22:50:56 +0000 (15:50 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 17 May 2026 00:46:16 +0000 (17:46 -0700)
commitd1dbe443a0abb4ea3ec35a16e36efe6d3bbf72f6
tree9e23942f3600de6eec59956d7930199d3bd7000c
parent0e2647792f60df746422d6089daf9d56945d5f91
bpf: Fix arg_track_join log to use sa prefix for stack arg slots

arg_track_join() logs state transitions at CFG merge points. For
stack arg slots (r >= MAX_BPF_REG), it printed "r11:", "r12:", etc.,
which is misleading since r11 is a special register (BPF_REG_PARAMS)
not meaningful to the user.

Fix it to print "sa0:", "sa1:", etc., matching the per-instruction
transition log in arg_track_log() which already uses the "sa" prefix.

Update the existing stack_arg_pruning_type_mismatch selftest to expect
the corrected format.

Fixes: 2af4e792773f ("bpf: Extend liveness analysis to track stack argument slots")
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260515225056.823086-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/liveness.c
tools/testing/selftests/bpf/progs/verifier_stack_arg.c