Introduce capable_any()
Get series with b4
b4 am [email protected]Versions newest first
- v4 Latest9 patches 13 repliesIn review
Changes in v4 from the cover letter
- add CAP_OPT_NODENYAUDIT capable flag
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | capability: introduce new capable flag NODENYAUDITinclude/ security/ security/ | +15 | 5 replies | |
| 2/9 | capability: add any wrapper to test for multiple caps with exactly one audit messageinclude/ kernel/ | +80 | 0 replies | |
| 3/9 | capability: use new capable_any functionalityinclude/ | +3 | 1 reply | |
| 4/9 | block: use new capable_any functionalityblock/ | +1 | 2 replies | |
| 5/9 | drivers: use new capable_any functionalitydrivers/ drivers/ drivers/ | +3 | 1 reply | |
| 6/9 | fs: use new capable_any functionalityfs/ | +1 | 1 reply | |
| 7/9 | kernel: use new capable_any functionalitykernel/ | +1 | 1 reply | |
| 8/9 | bpf: use new capable_any functionalitykernel/ | +1 | 1 reply | |
| 9/9 | net: use new capable_any functionalityinclude/ net/ net/ +4 more | +18 | 1 reply |
Reviews trailers per patch
7 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Christian Brauner | Alexander Gordeev | Andrii Nakryiko | Miquel Raynal | Serge Hallyn |
|---|---|---|---|---|---|
| 1/9 | R-b | ||||
| 2/9 | |||||
| 3/9 | A-b | ||||
| 4/9 | |||||
| 5/9 | A-b | ||||
| 6/9 | A-b | ||||
| 7/9 | R-b | ||||
| 8/9 | A-b | ||||
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v4 0/9] Introduce capable_any()
Add the interfaces capable_any() and ns_capable_any() as an alternative to multiple capable()/ns_capable() calls, like capable_any(CAP_SYS_NICE, CAP_SYS_ADMIN) instead of capable(CAP_SYS_NICE) || capable(CAP_SYS_ADMIN).
capable_any()/ns_capable_any() will in particular generate exactly one audit message, either for the left most capability in effect or, if the task has none, the first one.
This is especially helpful with regard to SELinux, where each audit message about a not allowed capability request will create a denial message. Using this new wrapper with the least invasive capability as left most argument (e.g. CAP_SYS_NICE before CAP_SYS_ADMIN) enables policy writers to only grant the least invasive one for the particular subject instead of both.
v3 discussion:
https://patchwork.kernel.org/project/selinux/patch/[email protected]/
v4:
- add CAP_OPT_NODENYAUDIT capable flag
Christian Göttsche (9):
capability: introduce new capable flag NODENYAUDIT
capability: add any wrapper to test for multiple caps with exactly one
audit message
capability: use new capable_any functionality
block: use new capable_any functionality
drivers: use new capable_any functionality
fs: use new capable_any functionality
kernel: use new capable_any functionality
bpf: use new capable_any functionality
net: use new capable_any functionality
block/ioprio.c | 9 +-- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +- drivers/net/caif/caif_serial.c | 2 +- drivers/s390/block/dasd_eckd.c | 2 +- fs/pipe.c | 2 +- include/linux/capability.h | 17 ++++-- include/linux/security.h | 2 + include/net/sock.h | 1 + kernel/bpf/syscall.c | 2 +- kernel/capability.c | 70 ++++++++++++++++++++++++ kernel/fork.c | 2 +- net/caif/caif_socket.c | 2 +- net/core/sock.c | 18 +++--- net/ieee802154/socket.c | 6 +- net/ipv4/ip_sockglue.c | 4 +- net/ipv6/ipv6_sockglue.c | 3 +- net/unix/scm.c | 2 +- security/apparmor/capability.c | 8 ++- security/selinux/hooks.c | 14 +++-- 19 files changed, 123 insertions(+), 46 deletions(-)
Signature · 1 line
2.40.1