diff options
author | Alexei Starovoitov <ast@kernel.org> | 2024-03-07 17:08:06 -0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-03-11 15:37:24 -0700 |
commit | 79ff13e99169ddb0e2277e046dbfb112f77dfac5 (patch) | |
tree | 4ebc8420dd502d99d541e538ec00c80e6e4b2b15 /tools/bpf | |
parent | 4d2b56081c32cb33364745da434b88eeaa9d8d8d (diff) |
libbpf: Add support for bpf_arena.
mmap() bpf_arena right after creation, since the kernel needs to
remember the address returned from mmap. This is user_vm_start.
LLVM will generate bpf_arena_cast_user() instructions where
necessary and JIT will add upper 32-bit of user_vm_start
to such pointers.
Fix up bpf_map_mmap_sz() to compute mmap size as
map->value_size * map->max_entries for arrays and
PAGE_SIZE * map->max_entries for arena.
Don't set BTF at arena creation time, since it doesn't support it.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240308010812.89848-9-alexei.starovoitov@gmail.com
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions