From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755366AbbJUU0N (ORCPT ); Wed, 21 Oct 2015 16:26:13 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:51380 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767AbbJUU0K (ORCPT ); Wed, 21 Oct 2015 16:26:10 -0400 Subject: Re: [PATCH] apparmor: clarify CRYPTO dependency To: Arnd Bergmann , linux-security-module@vger.kernel.org References: <5026142.BskI2YQ2fk@wuerfel> Cc: James Morris , "Serge E. Hallyn" , linux-kernel@vger.kernel.org From: John Johansen Organization: Canonical Message-ID: <5627F4DC.4020803@canonical.com> Date: Wed, 21 Oct 2015 13:26:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5026142.BskI2YQ2fk@wuerfel> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 thanks Acked-by: John Johansen > > 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 > >