Skip to content

Conversation

@kernel-patches-daemon-bpf
Copy link

Pull request for series with
subject: bpftool: Use appropriate permissions for map access
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=967616

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 90b83ef
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967616
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 90b83ef
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967616
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 90b83ef
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967616
version: 1

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the series/967616=>bpf-next branch from 99d6695 to 3fb48b6 Compare May 30, 2025 14:52
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 90b83ef
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967674
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: bb1556e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967674
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: bb1556e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967674
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cd2e103
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967674
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cd2e103
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967674
version: 2

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the series/967616=>bpf-next branch from 37a5888 to 1310ce5 Compare June 2, 2025 17:58
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: Slava Imameev <[email protected]>
Add selftest cases that validate bpftool's expected behavior when
accessing maps protected from modification via security_bpf_map.

The test includes a BPF program attached to security_bpf_map with two maps:
- A protected map that only allows read-only access
- An unprotected map that allows full access

The test script attaches the BPF program to security_bpf_map and
verifies that for the bpftool map command:
- Read access works on both maps
- Write access fails on the protected map
- Write access succeeds on the unprotected map
- These behaviors remain consistent when the maps are pinned

Signed-off-by: Slava Imameev <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 7fdaba9
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=967674
version: 2

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the series/967616=>bpf-next branch from 1310ce5 to e29c2bc Compare June 5, 2025 16:32
@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=967674 expired. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/967616=>bpf-next branch June 7, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants