selinux: stop passing selinux_state pointers and their offspring
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 30 lines · Stephen Smalley
Linus observed that the pervasive passing of
selinux_statepointers introduced by me in commitaa8e712cee93("selinux: wrap global selinux state") adds overhead and complexity without providing any benefit. The original idea was to pave the way for SELinux namespaces but those have not yet been implemented and there isn't currently a concrete plan to do so. Remove the passing of theselinux_statepointers, reverting to direct use of the single globalselinux_state, and likewise remove passing of child pointers like theselinux_avc. Theselinux_policypointer remains as it is needed for atomic switching of policies.Suggested-by Linus Torvalds <[email protected]>Reported-by kernel test robot <[email protected]>Signed-off-by Stephen Smalley <[email protected]>---
v2 fixes thelockdep_assert_held()insecurity/selinux/ima.creported by kernel test robot.security/selinux/avc.c | 197 ++++----- security/selinux/hooks.c | 549 ++++++++++--------------- security/selinux/ibpkey.c | 2 +- security/selinux/ima.c | 37 +- security/selinux/include/avc.h | 29 +- security/selinux/include/avc_ss.h | 3 +- security/selinux/include/conditional.h | 4 +- security/selinux/include/ima.h | 10 +- security/selinux/include/security.h | 171 +++----- security/selinux/netif.c | 2 +- security/selinux/netlabel.c | 17 +-
Quoted 8 lines
security/selinux/netnode.c | 4 +- security/selinux/netport.c | 2 +- security/selinux/selinuxfs.c | 208 ++++------ security/selinux/ss/services.c | 346 +++++++--------- security/selinux/ss/services.h | 1 - security/selinux/status.c | 44 +- security/selinux/xfrm.c | 20 +- 18 files changed, 651 insertions(+), 995 deletions(-)
Merged into selinux/next, thanks Stephen.
Signature · 1 line
paul-moore.com