Commit d32179e8 authored by Slava Imameev's avatar Slava Imameev Committed by Alexei Starovoitov
Browse files

bpftool: Use appropriate permissions for map access



Modify several functions in tools/bpf/bpftool/common.c to allow
specification of requested access for file descriptors, such as
read-only access.

Update bpftool to request only read access for maps when write
access is not required. This fixes errors when reading from maps
that are protected from modification via security_bpf_map.

Signed-off-by: default avatarSlava Imameev <slava.imameev@crowdstrike.com>
Reviewed-by: default avatarQuentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/r/20250620151812.13952-1-slava.imameev@crowdstrike.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent e30329b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment