]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libbpf: Use mmap to parse vmlinux BTF from sysfs
authorLorenz Bauer <lmb@isovalent.com>
Tue, 20 May 2025 13:01:19 +0000 (14:01 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 23 May 2025 17:06:28 +0000 (10:06 -0700)
commit3c0421c93ce4ff0f5f2612666122c34fc941d569
tree0d58516e4141028990b198cedd2bbf6c01ce71aa
parent828226b69ff54d57afd7b3cb56095ef8186ba290
libbpf: Use mmap to parse vmlinux BTF from sysfs

Teach libbpf to use mmap when parsing vmlinux BTF from /sys. We don't
apply this to fall-back paths on the regular file system because there
is no way to ensure that modifications underlying the MAP_PRIVATE
mapping are not visible to the process.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250520-vmlinux-mmap-v5-3-e8c941acc414@isovalent.com
tools/lib/bpf/btf.c