summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorXu Yunxiang <xyx2021@mail.ustc.edu.cn>2026-11-03 03:03:49 +0800
committerAlexei Starovoitov <ast@kernel.org>2026-11-02 22:42:10 +0000
commitd537252cc8a53b6ed6a3e7d0d895cb1cdd3ba42c (patch)
treeb66c73ad9a148975625f67208055490e812621f3 /scripts/basic
parentfdda033f7fb5f96f016240ecb1746cd4fc454d9f (diff)
downloadlinux-d537252cc8a53b6ed6a3e7d0d895cb1cdd3ba42c.tar.gz
linux-d537252cc8a53b6ed6a3e7d0d895cb1cdd3ba42c.zip
bpf: Propagate scalar precision through stack arguments
Outgoing stack arguments retain scalar verifier state separately from registers and ordinary spills. State comparison uses their precision marks, but propagate_precision() does not carry those dependencies from a reused state to the current path's ancestors. A path can consequently reuse a state without making earlier checkpoints distinguish scalar values that will later be used as memory offsets. Seed the existing backtracking batch with precise scalar argument slots from every frame. Incoming arguments live in the caller's outgoing slots, so include caller frames as well as the current frame. Also cover scalar argument slots in bpf_mark_all_scalars_precise(), so conservative fallback preserves the same invariant. Keep its existing ancestor-only traversal and leave pointer and uninitialized slots alone. AI assistance was used in preparing this patch. Fixes: 0f6bd5e7a804 ("bpf: Support stack arguments for bpf functions") Signed-off-by: Xu Yunxiang <xyx2021@mail.ustc.edu.cn> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261102190350.788433-2-xyx2021@mail.ustc.edu.cn
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions