2011-06-29 03:48:12

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the security-testing tree

Hi James,

After merging the security-testing tree, today's linux-next build (x86_64
allmodconfig) failed like this:

security/built-in.o: In function `tomoyo_bprm_set_creds':
tomoyo.c:(.text+0x4698e): undefined reference to `tomoyo_load_policy'

I am not sure what caused this (but tomoyo_load_policy is guarded by
#ifndef CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
and that is set in this build).

I have used the security-testing tree from next-20110628 for today.
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (573.00 B)
(No filename) (490.00 B)
Download all attachments

2011-06-29 04:16:59

by Tetsuo Handa

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security-testing tree

Stephen Rothwell wrote:
> Hi James,
>
> After merging the security-testing tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> security/built-in.o: In function `tomoyo_bprm_set_creds':
> tomoyo.c:(.text+0x4698e): undefined reference to `tomoyo_load_policy'
>
Sorry. I forgot to add #ifndef there.
It is for embedded systems where running userspace policy loader is difficult.
Below patch fixes the error.

Regards.
---
From 262f32874cd073fe2684e07dc838381f1dd01fd4 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <[email protected]>
Date: Wed, 29 Jun 2011 13:07:52 +0900
Subject: [PATCH] TOMOYO: Fix build error with CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER=y .

I forgot to add #ifndef in commit 0e4ae0e0 "TOMOYO: Make several options
configurable.", resulting

security/built-in.o: In function `tomoyo_bprm_set_creds':
tomoyo.c:(.text+0x4698e): undefined reference to `tomoyo_load_policy'

error.

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
---
security/tomoyo/tomoyo.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index 2615c7d..d6f68a0 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -51,12 +51,14 @@ static int tomoyo_bprm_set_creds(struct linux_binprm *bprm)
*/
if (bprm->cred_prepared)
return 0;
+#ifndef CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
/*
* Load policy if /sbin/tomoyo-init exists and /sbin/init is requested
* for the first time.
*/
if (!tomoyo_policy_loaded)
tomoyo_load_policy(bprm->filename);
+#endif
/*
* Release reference to "struct tomoyo_domain_info" stored inside
* "bprm->cred->security". New reference to "struct tomoyo_domain_info"
--
1.6.1

2011-06-29 07:36:26

by James Morris

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the security-testing tree

On Wed, 29 Jun 2011, Tetsuo Handa wrote:

> From: Tetsuo Handa <[email protected]>
> Date: Wed, 29 Jun 2011 13:07:52 +0900
> Subject: [PATCH] TOMOYO: Fix build error with CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER=y .
>
> I forgot to add #ifndef in commit 0e4ae0e0 "TOMOYO: Make several options
> configurable.", resulting
>
> security/built-in.o: In function `tomoyo_bprm_set_creds':
> tomoyo.c:(.text+0x4698e): undefined reference to `tomoyo_load_policy'
>

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

--
James Morris
<[email protected]>