Skip to content

LSM: Drop security_delete_hooks()

Ondrej Mosnacek linux-security-module selinux 1 version Applied

Status from this message: Merged into selinux/next, thanks Ondrej!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 15 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2selinux: treat atomic flags more carefullysecurity/selinux/hooks.c security/selinux/include/security.h security/selinux/ss/services.c+61 -315 replies
2/2security,selinux: get rid of security_delete_hooks()include/linux/lsm_hooks.h security/Kconfig security/apparmor/lsm.c +9 more+654 -15910 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchStephen SmalleyCasey SchauflerKees CookJames Morris
1/2A-b R-b R-b
2/2A-b 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 4 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] LSM: Drop security_delete_hooks()

This is a third iteration of the attempt to fix a race condition in SELinux runtime disable. [1] [2]

This version takes the approach of removing the security_delete_hooks() function (and CONFIG_SECURITY_WRITABLE_HOOKS) and just returning from the hooks early when SELinux has been disabled on runtime. Note that the runtime disable functionality is being deprecated and this is only a temporary solution.

The first patch is an SMP semantics cleanup in SELinux; the second one builds on top of it and does the actual conversion.

Tested on Fedora Rawhide by running selinux-testsuite with SELinux enabled + boot tested with SELINUX=disabled. Also compile-tested with all LSMs enabled in config.

[1] https://lore.kernel.org/selinux/[email protected]/T/
[2] https://lore.kernel.org/selinux/[email protected]/T/

Ondrej Mosnacek (2):
selinux: treat atomic flags more carefully security,selinux: get rid of security_delete_hooks()

 include/linux/lsm_hooks.h           |  31 --
 security/Kconfig                    |   5 -
 security/apparmor/lsm.c             |   6 +-
 security/commoncap.c                |   2 +-
 security/loadpin/loadpin.c          |   2 +-
 security/lockdown/lockdown.c        |   2 +-
 security/security.c                 |   5 +-
 security/selinux/Kconfig            |   6 -
 security/selinux/hooks.c            | 763 ++++++++++++++++++++++++----
 security/selinux/include/security.h |  33 +-
 security/selinux/ss/services.c      |  38 +-
 security/smack/smack_lsm.c          |   4 +-
 security/tomoyo/tomoyo.c            |   6 +-
 security/yama/yama_lsm.c            |   2 +-
 14 files changed, 715 insertions(+), 190 deletions(-)
Signature · 1 line
2.24.1