From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Dunlap Subject: Re: [PATCH -next] security/audit/ima: fix build error Date: Thu, 12 Feb 2009 10:30:04 -0800 Message-ID: <49946AAC.4070107@oracle.com> References: <20090210194121.80256b72.sfr@canb.auug.org.au> <4991DBA0.1000008@oracle.com> <20090211094050.47c4828d.sfr@canb.auug.org.au> <20090212095414.733dd248.randy.dunlap@oracle.com> <1234463058.3104.7.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from acsinet12.oracle.com ([141.146.126.234]:19572 "EHLO acsinet12.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755237AbZBLSbF (ORCPT ); Thu, 12 Feb 2009 13:31:05 -0500 In-Reply-To: <1234463058.3104.7.camel@localhost.localdomain> Sender: linux-next-owner@vger.kernel.org List-ID: To: Mimi Zohar Cc: Randy Dunlap , Mimi Zohar , akpm , Stephen Rothwell , James Morris , LKML , linux-next@vger.kernel.org, Al Viro Mimi Zohar wrote: > On Thu, 2009-02-12 at 09:54 -0800, Randy Dunlap wrote: >> On Tue, 10 Feb 2009 19:30:24 -0500 Mimi Zohar wrote: >> >>> Stephen Rothwell wrote on 02/10/2009 05:40:50 PM: >>> >>>> Hi Randy, >>>> >>>> On Tue, 10 Feb 2009 11:55:12 -0800 Randy Dunlap >>> wrote: >>>>> Stephen Rothwell wrote: >>>>>> Dropped trees (temporarily): >>>>>> audit (difficult conflicts) >>>>> Maybe this is fixed by the dropped audit tree? >>>> The audit tree is Al Viro's (cc'd). But I *think* everything in it has >>>> been applied upstream. >>>> >>>>> linux-next-20090210/security/integrity/ima/ima_policy.c:111: error: >>> implicit >>>> declaration of function 'security_audit_rule_match' >>>>> linux-next-20090210/security/integrity/ima/ima_policy.c:230: error: >>> implicit >>>> declaration of function 'security_audit_rule_init' >>>>> when >>>>> CONFIG_SECURITY=y >>>>> CONFIG_AUDIT=n >>>>> CONFIG_IMA=y >>>>> CONFIG_IMA_AUDIT=y >>>> This looks more like a security subsystem than audit to me? >>> These are the IMA Kconfig rules: >>> CONFIG_IMA=y >>> CONFIG_IMA_MEASURE_PCR_IDX=10 >>> CONFIG_IMA_AUDIT=y >>> CONFIG_IMA_LSM_RULES=y >>> >>> CONFIG_IMA_LSM_RULES requires the audit subsystem. The default >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> measurement policy is not defined terms of the LSM extended >>> attributes, and thus is not required. >> >> This config still fails to build in linux-next-20090212. And the ^^^ >> statement above may be correct, but it's not enforced in Kconfig, so let's >> do that, OK? > > The patch looks good to me, but looking at the code, > http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=blob_plain;f=mm/shmem.c;hb=168b70b72a78f289046823d810c29376e211a6de > it doesn't look like the previous patch was applied. Which previous patch? The one for ima & SHMEM=n? Yes, that build combination still fails also. James...? >> From: Randy Dunlap >> >> IMA_LSM_RULES requires AUDIT. This is automatic if SECURITY_SELINUX=y >> but not when SECURITY_SMACK=y (and SECURITY_SELINUX=n), so make the >> dependency explicit. This fixes the following build error: >> >> security/integrity/ima/ima_policy.c:111:error: implicit declaration of function 'security_audit_rule_match' >> security/integrity/ima/ima_policy.c:230:error: implicit declaration of function 'security_audit_rule_init' >> >> Signed-off-by: Randy Dunlap > Acked-by: Mimi Zohar > >> --- >> security/integrity/ima/Kconfig | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> --- linux-next-20090212.orig/security/integrity/ima/Kconfig >> +++ linux-next-20090212/security/integrity/ima/Kconfig >> @@ -49,7 +49,7 @@ config IMA_AUDIT >> >> config IMA_LSM_RULES >> bool >> - depends on IMA && (SECURITY_SELINUX || SECURITY_SMACK) >> + depends on IMA && AUDIT && (SECURITY_SELINUX || SECURITY_SMACK) >> default y >> help >> - Disabling this option will disregard LSM based policy rules >> + Disabling this option will disregard LSM based policy rules. -- ~Randy