* 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
@ 2010-10-07 22:43 Christian Kujau
2010-10-07 23:57 ` Christian Kujau
0 siblings, 1 reply; 8+ messages in thread
From: Christian Kujau @ 2010-10-07 22:43 UTC (permalink / raw)
To: LKML; +Cc: takedakn, penguin-kernel
Hi,
I wanted to test Tomoyo, so I enabled CONFIG_SECURITY_TOMOYO in my
.config, wich enabled also:
+CONFIG_SECURITY=y
+CONFIG_SECURITYFS=y
+CONFIG_SECURITY_PATH=y
+CONFIG_SECURITY_TOMOYO=y
However, during boot the machine (PowerPC G4, 32 bit) now panics:
http://nerdbynature.de/bits/2.6.36-rc7/
I don't have a serial console, so I ran the image of the oops through some
OCR converter:
Kernel panic - not syncing: Profile uersion 0 is not supported
Call Trace:
[efB4fd60] [c0008c88] show_stack+0x48/0x168 (unreliable)
[ef84fda0] [c0375fe01 panic+0xa4/0x1ec
[ef84fdf0] [c01c5f30] tomoyo_close_control+0x0/0xa4
[efB4fe00] [c01cc2f0] tomoyo_load_policy+0xeB/0x11c
[ef84fe40] [c01cdd30] tomoyo_bprm_set_creds+0x84/0x88
[ef84fe50] [c01c37bc] security_bprm_set_creds+0x20/0x30
[ef84fe60] [c00a02cc] prepare_binprm+0x9e/0x128
[ef84fe90] [c00a0a10] do_execve+0x198/0x260
[ef84fed0] [e0009748] sys_execve+0x58/0x84
[efB4fef0] [c0010c1c] ret_from_syscall+0x0/0x38
--- Exception: C01 at kernel_execve+0x8/0x14
LR = init_post+0x7c/0x138
[ef84ffb0] [c000405c] init_post+0x20/0x138 (unreliable)
[cfB4ffd0] [c043a25c] kernel_init+0x13c/0x174
[ef84fff0] [c0010974] kernel_thread+0x4c/0x68
Rebooting in 180 seconds..
(Don't trust the numbers in the first two rows though (the ones in "[]"
brackets) the other ones should be fine)
I've not bisected the issue yet (compiling one kernel takes about ~40min
on this box), any ideas what might have caused this?
Christian.
--
BOFH excuse #380:
Operators killed when huge stack of backup tapes fell over.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
2010-10-07 22:43 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y Christian Kujau
@ 2010-10-07 23:57 ` Christian Kujau
2010-10-08 0:10 ` Tetsuo Handa
2010-10-08 4:55 ` KOSAKI Motohiro
0 siblings, 2 replies; 8+ messages in thread
From: Christian Kujau @ 2010-10-07 23:57 UTC (permalink / raw)
To: LKML; +Cc: takedakn, penguin-kernel
On Thu, 7 Oct 2010 at 15:43, Christian Kujau wrote:
> Kernel panic - not syncing: Profile uersion 0 is not supported
OK, I just saw that security/tomoyo/common.c panics when:
if (tomoyo_profile_version != 20090903)
panic("Profile version %u is not supported.\n",
tomoyo_profile_version);
If it's imperative that the profile version is somewhat current (mine was
not, I had old tomoyo-ccstools installed), I would have expected a
slightly more descriptive error messages (apart from that panic), but now
I know. Upgraded to tomoyo-tools-2.3.0-20100820 did the trick.
Sorry for the noise...
Christian.
--
BOFH excuse #86:
Runt packets
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
2010-10-07 23:57 ` Christian Kujau
@ 2010-10-08 0:10 ` Tetsuo Handa
2010-10-08 0:19 ` lists
2010-10-08 4:55 ` KOSAKI Motohiro
1 sibling, 1 reply; 8+ messages in thread
From: Tetsuo Handa @ 2010-10-08 0:10 UTC (permalink / raw)
To: lists; +Cc: linux-kernel, takedakn
Christian Kujau wrote:
> Kernel panic - not syncing: Profile uersion 0 is not supported
Thank you for using TOMOYO.
Linux 2.6.36 includes TOMOYO 2.3 which is not compatible with
TOMOYO 2.2 included in Linux 2.6.30-2.6.35 .
You need to delete /etc/tomoyo/ directory and recreate it using
new userspace tools. Please see http://tomoyo.sourceforge.jp/2.3/ .
Regards.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
2010-10-08 0:10 ` Tetsuo Handa
@ 2010-10-08 0:19 ` lists
0 siblings, 0 replies; 8+ messages in thread
From: lists @ 2010-10-08 0:19 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: LKML, takedakn, haradats
On Fri, 8 Oct 2010 at 09:10, Tetsuo Handa wrote:
> Linux 2.6.36 includes TOMOYO 2.3 which is not compatible with
> TOMOYO 2.2 included in Linux 2.6.30-2.6.35 .
Yes, that's what I found out now, see my other reply to this thread.
Thanks for the quick reply & again: sorry for the noise...
Christian.
--
BOFH excuse #189:
SCSI's too wide.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
2010-10-07 23:57 ` Christian Kujau
2010-10-08 0:10 ` Tetsuo Handa
@ 2010-10-08 4:55 ` KOSAKI Motohiro
2010-10-08 6:26 ` Tetsuo Handa
1 sibling, 1 reply; 8+ messages in thread
From: KOSAKI Motohiro @ 2010-10-08 4:55 UTC (permalink / raw)
To: Christian Kujau; +Cc: kosaki.motohiro, LKML, takedakn, penguin-kernel
> On Thu, 7 Oct 2010 at 15:43, Christian Kujau wrote:
> > Kernel panic - not syncing: Profile uersion 0 is not supported
>
> OK, I just saw that security/tomoyo/common.c panics when:
>
> if (tomoyo_profile_version != 20090903)
> panic("Profile version %u is not supported.\n",
> tomoyo_profile_version);
>
> If it's imperative that the profile version is somewhat current (mine was
> not, I had old tomoyo-ccstools installed), I would have expected a
> slightly more descriptive error messages (apart from that panic), but now
> I know. Upgraded to tomoyo-tools-2.3.0-20100820 did the trick.
I agree this zero information panic is suck.
Handa-san, please see this panic message again.
> Kernel panic - not syncing: Profile uersion 0 is not supported
Profile?
This message doesn't have any information which should we look!
And, 'profile' is wrong word. TOMOYO have to recommend to upgrade
userland tools here at minimum.
The best way is, of cource, you don't break backward compatibility.
> Call Trace:
> [efB4fd60] [c0008c88] show_stack+0x48/0x168 (unreliable)
> [ef84fda0] [c0375fe01 panic+0xa4/0x1ec
> [ef84fdf0] [c01c5f30] tomoyo_close_control+0x0/0xa4
> [efB4fe00] [c01cc2f0] tomoyo_load_policy+0xeB/0x11c
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
2010-10-08 4:55 ` KOSAKI Motohiro
@ 2010-10-08 6:26 ` Tetsuo Handa
2010-10-08 6:30 ` KOSAKI Motohiro
2010-10-08 8:47 ` James Morris
0 siblings, 2 replies; 8+ messages in thread
From: Tetsuo Handa @ 2010-10-08 6:26 UTC (permalink / raw)
To: kosaki.motohiro
Cc: linux-kernel, takedakn, lists, kawime, jkosina, linux-security-module
Jiri Kosina wrote: ( http://lkml.org/lkml/2010/8/11/80 )
> > The panic message was:
> > > Profile %u (used by '%s') not defined.
> >
> > Profile 0 (used by '0') not defined.
>
> Looking at the code ...
>
> void tomoyo_check_profile(void)
> {
> struct tomoyo_domain_info *domain;
> const int idx = tomoyo_read_lock();
> tomoyo_policy_loaded = true;
> /* Check all profiles currently assigned to domains are defined. */
> list_for_each_entry_rcu(domain, &tomoyo_domain_list, list) {
> const u8 profile = domain->profile;
> if (tomoyo_profile_ptr[profile])
> continue;
> panic("Profile %u (used by '%s') not defined.\n",
> profile, domain->domainname->name);
> }
> tomoyo_read_unlock(idx);
> if (tomoyo_profile_version != 20090903)
> panic("Profile version %u is not supported.\n",
> tomoyo_profile_version);
> printk(KERN_INFO "TOMOYO: 2.3.0\n");
> printk(KERN_INFO "Mandatory Access Control activated.\n");
> }
>
> makes one wonder whether not having up-to-date userspace really does
> qualify for unconditional kernel panic.
KOSAKI Motohiro wrote:
> Handa-san, please see this panic message again.
>
> > Kernel panic - not syncing: Profile uersion 0 is not supported
>
> Profile?
> This message doesn't have any information which should we look!
> And, 'profile' is wrong word. TOMOYO have to recommend to upgrade
> userland tools here at minimum.
I see. What about this?
>From cc7601c18982909987bbb48971acb86a69a3317a Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Fri, 8 Oct 2010 14:43:22 +0900
Subject: [PATCH] TOMOYO: Print URL information before panic().
Configuration files for TOMOYO 2.3 are not compatible with TOMOYO 2.2.
But current panic() message is too unfriendly and is confusing users.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
security/tomoyo/common.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index c668b44..1f0d45a 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -2051,13 +2051,22 @@ void tomoyo_check_profile(void)
const u8 profile = domain->profile;
if (tomoyo_profile_ptr[profile])
continue;
+ printk(KERN_ERR "You need to define profile %u before using it.\n",
+ profile);
+ printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ "
+ "for more information.\n");
panic("Profile %u (used by '%s') not defined.\n",
profile, domain->domainname->name);
}
tomoyo_read_unlock(idx);
- if (tomoyo_profile_version != 20090903)
+ if (tomoyo_profile_version != 20090903) {
+ printk(KERN_ERR "You need to install userland programs for "
+ "TOMOYO 2.3 and initialize policy configuration.\n");
+ printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ "
+ "for more information.\n");
panic("Profile version %u is not supported.\n",
tomoyo_profile_version);
+ }
printk(KERN_INFO "TOMOYO: 2.3.0\n");
printk(KERN_INFO "Mandatory Access Control activated.\n");
}
--
1.7.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
2010-10-08 6:26 ` Tetsuo Handa
@ 2010-10-08 6:30 ` KOSAKI Motohiro
2010-10-08 8:47 ` James Morris
1 sibling, 0 replies; 8+ messages in thread
From: KOSAKI Motohiro @ 2010-10-08 6:30 UTC (permalink / raw)
To: Tetsuo Handa
Cc: kosaki.motohiro, linux-kernel, takedakn, lists, kawime, jkosina,
linux-security-module
> From cc7601c18982909987bbb48971acb86a69a3317a Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Fri, 8 Oct 2010 14:43:22 +0900
> Subject: [PATCH] TOMOYO: Print URL information before panic().
>
> Configuration files for TOMOYO 2.3 are not compatible with TOMOYO 2.2.
> But current panic() message is too unfriendly and is confusing users.
>
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> ---
> security/tomoyo/common.c | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
> index c668b44..1f0d45a 100644
> --- a/security/tomoyo/common.c
> +++ b/security/tomoyo/common.c
> @@ -2051,13 +2051,22 @@ void tomoyo_check_profile(void)
> const u8 profile = domain->profile;
> if (tomoyo_profile_ptr[profile])
> continue;
> + printk(KERN_ERR "You need to define profile %u before using it.\n",
> + profile);
> + printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ "
> + "for more information.\n");
> panic("Profile %u (used by '%s') not defined.\n",
> profile, domain->domainname->name);
> }
> tomoyo_read_unlock(idx);
> - if (tomoyo_profile_version != 20090903)
> + if (tomoyo_profile_version != 20090903) {
> + printk(KERN_ERR "You need to install userland programs for "
> + "TOMOYO 2.3 and initialize policy configuration.\n");
> + printk(KERN_ERR "Please see http://tomoyo.sourceforge.jp/2.3/ "
> + "for more information.\n");
> panic("Profile version %u is not supported.\n",
> tomoyo_profile_version);
> + }
> printk(KERN_INFO "TOMOYO: 2.3.0\n");
> printk(KERN_INFO "Mandatory Access Control activated.\n");
> }
> --
> 1.7.1
Looks good to me. thanks.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y
2010-10-08 6:26 ` Tetsuo Handa
2010-10-08 6:30 ` KOSAKI Motohiro
@ 2010-10-08 8:47 ` James Morris
1 sibling, 0 replies; 8+ messages in thread
From: James Morris @ 2010-10-08 8:47 UTC (permalink / raw)
To: Tetsuo Handa
Cc: kosaki.motohiro, linux-kernel, takedakn, lists, kawime, jkosina,
linux-security-module
On Fri, 8 Oct 2010, Tetsuo Handa wrote:
> Date: Fri, 8 Oct 2010 14:43:22 +0900
> Subject: [PATCH] TOMOYO: Print URL information before panic().
>
> Configuration files for TOMOYO 2.3 are not compatible with TOMOYO 2.2.
> But current panic() message is too unfriendly and is confusing users.
>
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
--
James Morris
<jmorris@namei.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-10-08 8:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-07 22:43 2.6.36-rc7: kernel panic with SECURITY_TOMOYO=y Christian Kujau
2010-10-07 23:57 ` Christian Kujau
2010-10-08 0:10 ` Tetsuo Handa
2010-10-08 0:19 ` lists
2010-10-08 4:55 ` KOSAKI Motohiro
2010-10-08 6:26 ` Tetsuo Handa
2010-10-08 6:30 ` KOSAKI Motohiro
2010-10-08 8: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
all inboxes | Powered by JetHome®