Commit a539e2a6 authored by Lorenz Bauer's avatar Lorenz Bauer Committed by Andrii Nakryiko
Browse files

btf: Allow mmap of vmlinux btf



User space needs access to kernel BTF for many modern features of BPF.
Right now each process needs to read the BTF blob either in pieces or
as a whole. Allow mmaping the sysfs file so that processes can directly
access the memory allocated for it in the kernel.

remap_pfn_range is used instead of vm_insert_page due to aarch64
compatibility issues.

Signed-off-by: default avatarLorenz Bauer <lmb@isovalent.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Tested-by: default avatarAlan Maguire <alan.maguire@oracle.com>
Reviewed-by: default avatarShakeel Butt <shakeel.butt@linux.dev>
Link: https://lore.kernel.org/bpf/20250520-vmlinux-mmap-v5-1-e8c941acc414@isovalent.com
parent 8259eb0e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment