summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-11-02 05:59:13 +0000
committerAlexei Starovoitov <ast@kernel.org>2026-11-02 17:53:14 +0000
commitc9a45b2ede01b02b3e4dd95231c038511812eef7 (patch)
treea7504b511a6d97dd800c715cad3743d66c863d10 /scripts/basic/split-include.c
parentcdefba74b53fb9b482355ebde1654800aea45dae (diff)
downloadlinux-c9a45b2ede01b02b3e4dd95231c038511812eef7.tar.gz
linux-c9a45b2ede01b02b3e4dd95231c038511812eef7.zip
selftests/bpf: Test a callee that overwrites a spilled pointer of its caller
The caller spills &fp[-8] to fp-16 and passes a pointer to another slot of its frame to a callee, which stores a pointer to a map value to fp-16. The caller fills fp-16 and stores through it. That store is not a certain write to fp-8. Three valid progs read fp-8 after the store. The callee is a static subprog or a callback of bpf_loop(). In callee_overwrites_spilled_r10 the slot holds a copy of r10. That prog also needs "bpf: Fix the join of fp+0 with a value that is not a pointer to stack". Without the fix they fail with: reading from stack off -8+0 size 8, slot poisoned by dead code elimination In callee_overwrites_spilled_fp_hidden_store the store hides a write to the counter of a loop. Without the fix the prog loads, and it accesses a map value out of bounds. The test for callx checks the spilled pointer in the log. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20261102055913.3598414-5-alexei.starovoitov@gmail.com
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions