From: Paul Moore <pmoore@redhat.com>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Guenter Roeck <linux@roeck-us.net>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-audit@redhat.com,
Richard Guy Briggs <rgb@redhat.com>
Subject: Re: linux-next: Tree for Jan 20 -- Kernel panic - Unable to mount root fs
Date: Tue, 20 Jan 2015 19:14:46 -0500 [thread overview]
Message-ID: <1528536.jyty2pu4Mz@sifl> (raw)
In-Reply-To: <1517211.UYLV49hvpg@sifl>
On Tuesday, January 20, 2015 07:04:54 PM Paul Moore wrote:
> On Wednesday, January 21, 2015 12:27:26 AM Sabrina Dubroca wrote:
> > 2015-01-20, 23:17:25 +0000, Al Viro wrote:
> > > On Tue, Jan 20, 2015 at 10:50:41PM +0000, Al Viro wrote:
> > > > doesn't look at _anything_ other than name->name other than for
> > > > audit_inode(). And name->name is apparently the same.
> > > >
> > > > It looks like something ends up buggering name->name in process, but
> > > > then
> > > > the damn thing appears to be normal after return from
> > > > filename_lookup()...
> > >
> > > If my reconstruction of what's going on is correct, the call chain here
> > > is do_path_lookup() <- kern_path() <- lookup_bdev() <-
> > > blkdev_get_by_path()
> > > <- mount_bdev() <- some_type.mount() <- mount_fs()
> > > <- vfs_kern_mount() <- do_new_mount() <- do_mount() <- sys_mount()
> > > <- do_mount_root() <- mount_block_root() <- mount_root(). Which is
> > > obscenely long, BTW, but that's a separate story...
> > >
> > > Could you slap
> > >
> > > struct stat buf;
> > > int n = sys_newstat(name, &buf);
> > > printk(KERN_ERR "stat(\"%s\") -> %d\n", name, n);
> > > n = sys_newstat("/dev", &buf);
> > > printk(KERN_ERR "stat(\"dev\") -> %d\n", n);
> > >
> > > in the beginning of mount_block_root() (init/do_mounts.c) and see what
> > > it
> > > prints?
> >
> > I get
> >
> > stat("/dev/root") -> -2
> > stat("dev") -> -2
> > with the patch applied (+panic)
> >
> >
> > and:
> >
> > stat("/dev/root") -> 0
> > stat("dev") -> 0
> > with the old version of do_path_lookup.
>
> Wait a minute ... at this early stage of boot, I'm pretty sure we don't have
> a valid current->audit_context since we haven't fork'd anything. If the
> audit context was non-NULL garbage that might explain the panic ...
Could you try initializing the init_task's audit_context to NULL in the
INIT_TASK macro in include/linux/init_task.h?
Example:
#define INIT_TASK(tsk)
{
.state = 0,
.stack = &init_thread_info,
...
.audit_context = NULL,
...
}
--
paul moore
security @ redhat
next prev parent reply other threads:[~2015-01-21 0:14 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150120185308.53f4af4e@canb.auug.org.au>
2015-01-20 16:56 ` linux-next: Tree for Jan 20 -- Kernel panic - Unable to mount root fs Sabrina Dubroca
2015-01-20 17:39 ` Paul Moore
2015-01-20 17:51 ` Sabrina Dubroca
2015-01-20 19:54 ` Al Viro
2015-01-20 20:45 ` Sabrina Dubroca
2015-01-20 21:02 ` Al Viro
2015-01-20 21:38 ` Sabrina Dubroca
2015-01-20 21:58 ` Al Viro
2015-01-20 22:08 ` Sabrina Dubroca
2015-01-20 22:13 ` Guenter Roeck
2015-01-20 22:50 ` Al Viro
2015-01-20 23:17 ` Al Viro
2015-01-20 23:27 ` Sabrina Dubroca
2015-01-21 0:04 ` Paul Moore
2015-01-21 0:14 ` Paul Moore [this message]
2015-01-21 0:41 ` Al Viro
2015-01-21 2:44 ` Guenter Roeck
2015-01-21 3:36 ` Al Viro
2015-01-21 4:01 ` Guenter Roeck
2015-01-21 4:36 ` Al Viro
2015-01-21 11:05 ` Sabrina Dubroca
2015-01-21 13:32 ` Guenter Roeck
2015-01-21 18:29 ` Al Viro
2015-01-21 19:06 ` Guenter Roeck
2015-01-21 20:06 ` Al Viro
2015-01-21 21:03 ` Guenter Roeck
2015-01-21 21:28 ` Al Viro
2015-01-21 21:38 ` Guenter Roeck
2015-01-21 21:40 ` Sabrina Dubroca
2015-01-21 21:54 ` Paul Walmsley
2015-01-22 2:28 ` Paul Moore
2015-01-22 4:12 ` Al Viro
2015-01-22 4:49 ` Paul Moore
2015-01-21 21:30 ` Sabrina Dubroca
2015-01-21 14:42 ` Thierry Reding
2015-01-21 15:24 ` Paul Moore
2015-01-21 15:39 ` Thierry Reding
2015-01-21 15:54 ` Sabrina Dubroca
2015-01-21 16:16 ` Paul Moore
2015-01-21 17:38 ` Al Viro
2015-01-21 17:51 ` Guenter Roeck
2015-01-21 16:21 ` Guenter Roeck
2015-01-21 15:06 ` Paul Moore
2015-01-20 21:43 ` Guenter Roeck
2015-01-20 17:54 ` Fabio Estevam
2015-01-20 19:00 ` Ross Zwisler
2015-01-20 19:16 ` Fabio Estevam
2015-01-20 19:24 ` Paul Moore
2015-01-20 19:43 ` Fabio Estevam
2015-01-20 20:10 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1528536.jyty2pu4Mz@sifl \
--to=pmoore@redhat.com \
--cc=linux-audit@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rgb@redhat.com \
--cc=sd@queasysnail.net \
--cc=sfr@canb.auug.org.au \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).