-
Notifications
You must be signed in to change notification settings - Fork 153
bpftool: Use appropriate permissions for map access #9023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Upstream branch: 90b83ef |
|
Upstream branch: 90b83ef |
aa3cfcd to
99d6695
Compare
86d7ac4 to
9fa5029
Compare
|
Upstream branch: 90b83ef |
99d6695 to
3fb48b6
Compare
|
Upstream branch: 90b83ef |
3fb48b6 to
b173ea5
Compare
9fa5029 to
148f936
Compare
|
Upstream branch: bb1556e |
b173ea5 to
7a0bb19
Compare
148f936 to
b3eed83
Compare
|
Upstream branch: bb1556e |
7a0bb19 to
c94f339
Compare
b3eed83 to
5fa9e7d
Compare
|
Upstream branch: cd2e103 |
c94f339 to
37a5888
Compare
5fa9e7d to
810d3c3
Compare
|
Upstream branch: cd2e103 |
37a5888 to
1310ce5
Compare
810d3c3 to
8af34a9
Compare
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]>
|
Upstream branch: 7fdaba9 |
1310ce5 to
e29c2bc
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=967674 expired. Closing PR. |
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