diff options
| author | Tejun Heo <tj@kernel.org> | 2026-05-22 07:22:16 -1000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-05-23 01:50:33 -0700 |
| commit | 53cc12a2dc88c2c6f62f507548640885a70a56a8 (patch) | |
| tree | 9ea0152b3649e09ec1f7759b607af3b59fa8ec16 /include/linux/stackprotector.h | |
| parent | 7c48a28c1bbe26e272bc978a42adb757fc6aa639 (diff) | |
bpf/arena: Add bpf_arena_map_kern_vm_start() and bpf_prog_arena()
struct bpf_arena is opaque to callers outside arena.c. Add two helpers
for struct_ops subsystems that need to reach into an arena:
bpf_arena_map_kern_vm_start(struct bpf_map *map)
returns @map's kern_vm_start. A sched_ext follow-up needs this
to translate kern_va <-> uaddr.
bpf_prog_arena(struct bpf_prog *prog)
returns the bpf_map of the arena referenced by @prog (NULL if
@prog references no arena). The verifier enforces at most one
arena per program. Used by struct_ops callers that auto-discover
an arena from a member prog and need to take a map reference.
Suggested-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/r/20260522172219.1423324-6-tj@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
