Skip to contentSkip to conversation

apparmor: clarify CRYPTO dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Oct 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 apparmor: clarify CRYPTO dependency

The crypto framework can be built as a loadable module, but the apparmor hash code can only be built-in, which then causes a link error:

security/built-in.o: In function `aa_calc_profile_hash':
integrity_audit.c:(.text+0x21610): undefined reference to crypto_shash_update' security/built-in.o: In function init_profile_hash':
integrity_audit.c:(.init.text+0xb4c): undefined reference to `crypto_alloc_shash'

This changes Apparmor to use 'select CRYPTO' like a lot of other subsystems do.

security/apparmor/Kconfig +1 -1
index d49c53960b60..232469baa94f 100644
@@ -33,7 +33,7 @@ config SECURITY_APPARMOR_BOOTPARAM_VALUE
 config SECURITY_APPARMOR_HASH
 	bool "SHA1 hash of loaded profiles"
 	depends on SECURITY_APPARMOR
-	depends on CRYPTO
+	select CRYPTO
 	select CRYPTO_SHA1
 	default y
 
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Arnd Bergmann

The crypto framework can be built as a loadable module, but the apparmor hash code can only be built-in, which then causes a link error:

security/built-in.o: In function `aa_calc_profile_hash':
integrity_audit.c:(.text+0x21610): undefined reference to crypto_shash_update' security/built-in.o: In function init_profile_hash':
integrity_audit.c:(.init.text+0xb4c): undefined reference to `crypto_alloc_shash'

Quoted 4 lines

This changes Apparmor to use 'select CRYPTO' like a lot of other subsystems do.

thanks

Quoted 15 lines
security/apparmor/Kconfig +1 -1
index d49c53960b60..232469baa94f 100644
@@ -33,7 +33,7 @@ config SECURITY_APPARMOR_BOOTPARAM_VALUE
 config SECURITY_APPARMOR_HASH
 	bool "SHA1 hash of loaded profiles"
 	depends on SECURITY_APPARMOR
-	depends on CRYPTO
+	select CRYPTO
 	select CRYPTO_SHA1
 	default y
 
maintainer
#2 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

The crypto framework can be built as a loadable module, but the apparmor hash code can only be built-in, which then causes a link error:

security/built-in.o: In function `aa_calc_profile_hash':
integrity_audit.c:(.text+0x21610): undefined reference to crypto_shash_update' security/built-in.o: In function init_profile_hash':
integrity_audit.c:(.init.text+0xb4c): undefined reference to `crypto_alloc_shash'

Quoted 4 lines

This changes Apparmor to use 'select CRYPTO' like a lot of other subsystems do.

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

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