summaryrefslogtreecommitdiff
path: root/tools/include/uapi/linux
diff options
context:
space:
mode:
authorEmil Tsalapatis <emil@etsalapatis.com>2025-12-16 12:33:24 -0500
committerAndrii Nakryiko <andrii@kernel.org>2025-12-16 10:42:55 -0800
commitc1f61171d44b19834cf24def2cf832f2688e83df (patch)
tree18cf11094d501d14cc102959130bc61b5fe29b9e /tools/include/uapi/linux
parent0aa721437e4b74d737f58582f1bbf2eea3e038c7 (diff)
libbpf: Move arena globals to the end of the arena
Arena globals are currently placed at the beginning of the arena by libbpf. This is convenient, but prevents users from reserving guard pages in the beginning of the arena to identify NULL pointer dereferences. Adjust the load logic to place the globals at the end of the arena instead. Also modify bpftool to set the arena pointer in the program's BPF skeleton to point to the globals. Users now call bpf_map__initial_value() to find the beginning of the arena mapping and use the arena pointer in the skeleton to determine which part of the mapping holds the arena globals and which part is free. Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/bpf/20251216173325.98465-5-emil@etsalapatis.com
Diffstat (limited to 'tools/include/uapi/linux')
0 files changed, 0 insertions, 0 deletions