linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] apparmor: clarify CRYPTO dependency
@ 2015-10-21 19:16 Arnd Bergmann
  2015-10-21 20:26 ` John Johansen
  2015-10-21 23:47 ` James Morris
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2015-10-21 19:16 UTC (permalink / raw)
  To: John Johansen, linux-security-module
  Cc: James Morris, Serge E. Hallyn, linux-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/security/apparmor/Kconfig b/security/apparmor/Kconfig
index d49c53960b60..232469baa94f 100644
--- a/security/apparmor/Kconfig
+++ b/security/apparmor/Kconfig
@@ -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
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] apparmor: clarify CRYPTO dependency
  2015-10-21 19:16 [PATCH] apparmor: clarify CRYPTO dependency Arnd Bergmann
@ 2015-10-21 20:26 ` John Johansen
  2015-10-21 23:47 ` James Morris
  1 sibling, 0 replies; 3+ messages in thread
From: John Johansen @ 2015-10-21 20:26 UTC (permalink / raw)
  To: Arnd Bergmann, linux-security-module
  Cc: James Morris, Serge E. Hallyn, linux-kernel

On 10/21/2015 12:16 PM, Arnd Bergmann wrote:
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
thanks

Acked-by: John Johansen <john.johansen@canonical.com>

> 
> diff --git a/security/apparmor/Kconfig b/security/apparmor/Kconfig
> index d49c53960b60..232469baa94f 100644
> --- a/security/apparmor/Kconfig
> +++ b/security/apparmor/Kconfig
> @@ -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
>  
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] apparmor: clarify CRYPTO dependency
  2015-10-21 19:16 [PATCH] apparmor: clarify CRYPTO dependency Arnd Bergmann
  2015-10-21 20:26 ` John Johansen
@ 2015-10-21 23:47 ` James Morris
  1 sibling, 0 replies; 3+ messages in thread
From: James Morris @ 2015-10-21 23:47 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: John Johansen, linux-security-module, James Morris,
	Serge E. Hallyn, linux-kernel

On Wed, 21 Oct 2015, Arnd Bergmann wrote:

> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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


-- 
James Morris
<jmorris@namei.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-21 23:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-21 19:16 [PATCH] apparmor: clarify CRYPTO dependency Arnd Bergmann
2015-10-21 20:26 ` John Johansen
2015-10-21 23:47 ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).