diff options
author | James Morris <jmorris@namei.org> | 2017-02-14 08:17:24 -0500 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-03-05 19:00:12 -0500 |
commit | dd0859dccbe291cf8179a96390f5c0e45cb9af1d (patch) | |
tree | e7a2b67dfdb2beaa07d42a314eb142289599d381 /security/selinux/Kconfig | |
parent | 84e6885e9e6a818d1ca1eabb9b720b357ab07a8b (diff) |
security: introduce CONFIG_SECURITY_WRITABLE_HOOKS
Subsequent patches will add RO hardening to LSM hooks, however, SELinux
still needs to be able to perform runtime disablement after init to handle
architectures where init-time disablement via boot parameters is not feasible.
Introduce a new kernel configuration parameter CONFIG_SECURITY_WRITABLE_HOOKS,
and a helper macro __lsm_ro_after_init, to handle this case.
Signed-off-by: James Morris <james.l.morris@oracle.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'security/selinux/Kconfig')
-rw-r--r-- | security/selinux/Kconfig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig index ea7e3efbe0f7..8af7a690eb40 100644 --- a/security/selinux/Kconfig +++ b/security/selinux/Kconfig | |||
@@ -40,6 +40,7 @@ config SECURITY_SELINUX_BOOTPARAM_VALUE | |||
40 | config SECURITY_SELINUX_DISABLE | 40 | config SECURITY_SELINUX_DISABLE |
41 | bool "NSA SELinux runtime disable" | 41 | bool "NSA SELinux runtime disable" |
42 | depends on SECURITY_SELINUX | 42 | depends on SECURITY_SELINUX |
43 | select SECURITY_WRITABLE_HOOKS | ||
43 | default n | 44 | default n |
44 | help | 45 | help |
45 | This option enables writing to a selinuxfs node 'disable', which | 46 | This option enables writing to a selinuxfs node 'disable', which |
@@ -50,6 +51,11 @@ config SECURITY_SELINUX_DISABLE | |||
50 | portability across platforms where boot parameters are difficult | 51 | portability across platforms where boot parameters are difficult |
51 | to employ. | 52 | to employ. |
52 | 53 | ||
54 | NOTE: selecting this option will disable the '__ro_after_init' | ||
55 | kernel hardening feature for security hooks. Please consider | ||
56 | using the selinux=0 boot parameter instead of enabling this | ||
57 | option. | ||
58 | |||
53 | If you are unsure how to answer this question, answer N. | 59 | If you are unsure how to answer this question, answer N. |
54 | 60 | ||
55 | config SECURITY_SELINUX_DEVELOP | 61 | config SECURITY_SELINUX_DEVELOP |