Skip to contentSkip to conversation

securityfs: do not depend on CONFIG_SECURITY

PATCH In review Eric Paris 2 participants 3 messages Aug 22, 2008 – Aug 28, 2008

Subsystems (2)
lore
Share & tools
lore

Eric Paris

author
#0 lore raw

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
index 3738cfa..f5fc64f 100644
@@ -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
index 5592939..d9f47ce 100644
@@ -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
index f654260..c05c127 100644
@@ -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
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Eric Paris

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.

Signature · 2 lines
James Morris
<[email protected]>
maintainer
#2 lore raw
In reply to Eric Paris
Quoted 6 lines · Eric Paris

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.

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

Signature · 2 lines
James Morris
<[email protected]>