From: Sasha Levin <sasha.levin@oracle.com>
To: Paul Moore <pmoore@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-audit@redhat.com
Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] fs: create proper filename objects using getname_kernel()
Date: Tue, 20 Jan 2015 22:48:58 -0500 [thread overview]
Message-ID: <54BF21AA.5010601@oracle.com> (raw)
In-Reply-To: <20150119200808.29706.73419.stgit@localhost>
On 01/19/2015 03:08 PM, Paul Moore wrote:
> There are several areas in the kernel that create temporary filename
> objects using the following pattern:
>
> int func(const char *name)
> {
> struct filename *file = { .name = name };
> ...
> return 0;
> }
>
> ... which for the most part works okay, but it causes havoc within the
> audit subsystem as the filename object does not persist beyond the
> lifetime of the function. This patch converts all of these temporary
> filename objects into proper filename objects using getname_kernel()
> and putname() which ensure that the filename object persists until the
> audit subsystem is finished with it.
Hi Paul,
With this patch (bisected) my vm fails to boot with a virtio-9p rootfs:
[ 27.313687] fa00 2097152 vda driver: virtio_blk
[ 27.314218] 103:00000 8192 sda driver: sd
[ 27.314714] DEBUG_BLOCK_EXT_DEVT is enabled, you need to specify explicit textual name for "root=" boot option.
[ 27.315963] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 27.316885] CPU: 29 PID: 1 Comm: swapper/0 Not tainted 3.19.0-rc5-next-20150120-sasha-00053-gb2e3c55-dirty #1772
[ 27.316885] ffffffffffffffff ffff88005cb8bd28 ffffffffb14522b5 000000000000004e
[ 27.316885] ffffffffb26d4950 ffff88005cb8bda8 ffffffffb144c298 ffff88005cb8bd48
[ 27.316885] ffffffff00000010 ffff88005cb8bdb8 ffff88005cb8bd58 fffffffffffffffe
[ 27.316885] Call Trace:
[ 27.316885] [<ffffffffb14522b5>] dump_stack+0x4f/0x7b
[ 27.316885] [<ffffffffb144c298>] panic+0xd2/0x216
[ 27.316885] [<ffffffffb431558b>] mount_block_root+0x18b/0x244
[ 27.316885] [<ffffffffb43158ae>] mount_root+0x128/0x133
[ 27.316885] [<ffffffffb4315a1b>] prepare_namespace+0x162/0x19b
[ 27.316885] [<ffffffffb4315223>] kernel_init_freeable+0x285/0x29a
[ 27.316885] [<ffffffffb14472b0>] ? rest_init+0xd0/0xd0
[ 27.316885] [<ffffffffb14472be>] kernel_init+0xe/0xf0
[ 27.316885] [<ffffffffb148007c>] ret_from_fork+0x7c/0xb0
[ 27.316885] [<ffffffffb14472b0>] ? rest_init+0xd0/0xd0
[ 27.316885] Dumping ftrace buffer:
[ 27.316885] (ftrace buffer empty)
[ 27.316885] Kernel Offset: 0x2d000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 27.316885] Rebooting in 1 seconds..
virtio-9p is not even listed as an option now.
Thanks,
Sasha
next prev parent reply other threads:[~2015-01-21 3:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 20:07 [PATCH 0/5] Overhaul the audit filename handling Paul Moore
2015-01-19 20:08 ` [PATCH 1/5] fs: rework getname_kernel to handle up to PATH_MAX sized filenames Paul Moore
2015-01-19 20:08 ` [PATCH 2/5] fs: create proper filename objects using getname_kernel() Paul Moore
2015-01-21 3:48 ` Sasha Levin [this message]
2015-01-21 14:29 ` Paul Moore
2015-01-19 20:08 ` [PATCH 3/5] audit: enable filename recording via getname_kernel() Paul Moore
2015-01-19 20:08 ` [PATCH 4/5] audit: fix filename matching in __audit_inode() and __audit_inode_child() Paul Moore
2015-01-19 20:08 ` [PATCH 5/5] audit: replace getname()/putname() hacks with reference counters 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=54BF21AA.5010601@oracle.com \
--to=sasha.levin@oracle.com \
--cc=linux-audit@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmoore@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.