Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  • Paul Moore's avatar
    selinux: remove the runtime disable functionality · f22f9aaf
    Paul Moore authored
    After working with the larger SELinux-based distros for several
    years, we're finally at a place where we can disable the SELinux
    runtime disable functionality.  The existing kernel deprecation
    notice explains the functionality and why we want to remove it:
    
      The selinuxfs "disable" node allows SELinux to be disabled at
      runtime prior to a policy being loaded into the kernel.  If
      disabled via this mechanism, SELinux will remain disabled until
      the system is rebooted.
    
      The preferred method of disabling SELinux is via the "selinux=0"
      boot parameter, but the selinuxfs "disable" node was created to
      make it easier for systems with primitive bootloaders that did not
      allow for easy modification of the kernel command line.
      Unfortunately, allowing for SELinux to be disabled at runtime makes
      it difficult to secure the kernel's LSM hooks using the
      "__ro_after_init" feature.
    
    It is that last sentence, mentioning the '__ro_after_init' hardening,
    which...
    f22f9aaf