summaryrefslogtreecommitdiff
path: root/include/linux/stacktrace.h
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2026-05-13 07:51:43 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-05-13 19:27:32 +0300
commit00c3ac4292a6bc3039008cdb45bd423087acb98e (patch)
tree1e3f606d3b520624265e7058981651f7723db5e9 /include/linux/stacktrace.h
parent5b31de88920b867edcbcd8d6d77b8be5b822b3dd (diff)
downloadlinux-00c3ac4292a6bc3039008cdb45bd423087acb98e.tar.xz
selftests/bpf: Add verifier tests for stack argument validation
Add inline-asm based verifier tests that exercise stack argument validation logic directly. Positive tests: - subprog call with 6 arg's - Two sequential calls to different subprogs (6-arg and 7-arg) - Share a r11 store for both branches Negative tests — verifier rejection: - Read from uninitialized incoming stack arg slot - Gap in outgoing slots: only r11-16 written, r11-8 missing - Write at r11-80, exceeding max 7 stack args - Missing store on one branch with a shared store - First call has proper stack arguments and the second call intends to inherit stack arguments but not working - r11 load ordering issue Negative tests — pointer/ref tracking: - Pruning type mismatch: one branch stores PTR_TO_STACK, the other stores a scalar, callee dereferences — must not prune - Release invalidation: bpf_sk_release invalidates a socket pointer stored in a stack arg slot - Packet pointer invalidation: bpf_skb_pull_data invalidates a packet pointer stored in a stack arg slot - Null propagation: PTR_TO_MAP_VALUE_OR_NULL stored in stack arg slot, null branch attempts dereference via callee Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20260513045143.2399278-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/stacktrace.h')
0 files changed, 0 insertions, 0 deletions