securityfs: do not depend on CONFIG_SECURITY
Subsystems (2)
PATCH 1/1 securityfs: do not depend on CONFIG_SECURITY
Add a new Kconfig option SECURITYFS which will build securityfs support but does not require CONFIG_SECURITY. The only current user of securityfs does not depend on CONFIG_SECURITY and there is no reason the full LSM needs to be built to build this fs.
---
Testing was basically just making sure that my kernel built with TCG_TPM on but SECURITY off. I don't actually have a way to test is TCG_TPM still worked properly....
drivers/char/tpm/Kconfig | 1 + include/linux/security.h | 54 +++++++++++++++++++++++------------------- security/Kconfig | 8 ++++++ security/Makefile | 3 +- 4 files changed, 41 insertions(+), 25 deletions(-)
drivers/char/tpm/Kconfig +1 -0
@@ -6,6 +6,7 @@ menuconfig TCG_TPM tristate "TPM Hardware Support" depends on HAS_IOMEM depends on EXPERIMENTAL + select SECURITYFS ---help--- If you have a TPM security chip in your system, which implements the Trusted Computing Group's specification,
drivers/char/tpm/tpm_bios.c +0 -0
include/linux/security.h +30 -24
71 lines not on this page · raw message
security/Kconfig +8 -0
@@ -51,6 +51,14 @@ config SECURITY If you are unsure how to answer this question, answer N. +config SECURITYFS + bool "Enable the securityfs filesystem" + help + This will build the securityfs filesystem. It is currently used by + the TPM bios character driver. It is not used by SELinux or SMACK. + + If you are unsure how to answer this question, answer N. + config SECURITY_NETWORK bool "Socket and Networking Security Hooks" depends on SECURITY
security/Makefile +2 -1
@@ -10,7 +10,8 @@ subdir-$(CONFIG_SECURITY_SMACK) += smack obj-y += commoncap.o # Object file lists -obj-$(CONFIG_SECURITY) += security.o capability.o inode.o +obj-$(CONFIG_SECURITY) += security.o capability.o +obj-$(CONFIG_SECURITYFS) += inode.o # Must precede capability.o in order to stack properly. obj-$(CONFIG_SECURITY_SELINUX) += selinux/built-in.o obj-$(CONFIG_SECURITY_SMACK) += smack/built-in.o
security/inode.c +0 -0
Quoted 7 lines · Eric Paris
Add a new
Kconfigoption SECURITYFS which will build securityfs support but does not requireCONFIG_SECURITY. The only current user of securityfs does not depend onCONFIG_SECURITYand there is no reason the full LSM needs to be built to build this fs.Signed-off-by Eric Paris <[email protected]>
Signature · 2 lines
James Morris <[email protected]>
James Morris
maintainerQuoted 6 lines · Eric Paris
Add a new
Kconfigoption SECURITYFS which will build securityfs support but does not requireCONFIG_SECURITY. The only current user of securityfs does not depend onCONFIG_SECURITYand there is no reason the full LSM needs to be built to build this fs.Signed-off-by Eric Paris <[email protected]>
Applied togit://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
Signature · 2 lines
James Morris <[email protected]>