tools/testing/selftests/bpf/progs/btf__verifier_stack_arg_order.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/progs/btf__verifier_stack_arg_order.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/progs/btf__verifier_stack_arg_order.c- Extension
.c- Size
- 906 bytes
- Lines
- 50
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
vmlinux.hbpf/bpf_helpers.h
Detected Declarations
function subprog_bad_order_6argsfunction subprog_call_before_load_6argsfunction subprog_pruning_call_before_load_6argsfunction subprog_bad_ptr_7argsfunction subprog_call_before_load_6argsfunction subprog_pruning_call_before_load_6argsfunction subprog_bad_ptr_7args
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \
defined(__BPF_FEATURE_STACK_ARGUMENT)
int subprog_bad_order_6args(int a, int b, int c, int d, int e, int f)
{
return a + b + c + d + e + f;
}
int subprog_call_before_load_6args(int a, int b, int c, int d, int e, int f)
{
return a + b + c + d + e + f;
}
int subprog_pruning_call_before_load_6args(int a, int b, int c, int d, int e, int f)
{
return a + b + c + d + e + f;
}
void subprog_bad_ptr_7args(long *a, int b, int c, int d, int e, int f, int g)
{
}
#else
int subprog_bad_order_6args(void)
{
return 0;
}
int subprog_call_before_load_6args(void)
{
return 0;
}
int subprog_pruning_call_before_load_6args(void)
{
return 0;
}
void subprog_bad_ptr_7args(void)
{
}
#endif
Annotation
- Immediate include surface: `vmlinux.h`, `bpf/bpf_helpers.h`.
- Detected declarations: `function subprog_bad_order_6args`, `function subprog_call_before_load_6args`, `function subprog_pruning_call_before_load_6args`, `function subprog_bad_ptr_7args`, `function subprog_call_before_load_6args`, `function subprog_pruning_call_before_load_6args`, `function subprog_bad_ptr_7args`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.