[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200805311948.HAD69220.tFOVHQOFSOFLJM@I-love.SAKURA.ne.jp>
Date: Sat, 31 May 2008 19:48:22 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: hch@...radead.org
Cc: miklos@...redi.hu, linux-security-module@...r.kernel.org,
linux-fsdevel@...r.kernel.org, jmorris@...ei.org,
sds@...ho.nsa.gov, eparis@...hat.com, casey@...aufler-ca.com,
agruen@...e.de, jjohansen@...e.de, viro@...IV.linux.org.uk,
linux-kernel@...r.kernel.org
Subject: Re: [patch 01/15] security: pass path to inode_create
Christoph Hellwig wrote:
> On Thu, May 29, 2008 at 03:49:04PM +0200, Miklos Szeredi wrote:
> > From: Miklos Szeredi <mszeredi@...e.cz>
> >
> > In the inode_create() security operation and related functions pass
> > the path (vfsmount + dentry) to the parent directory instead of the
> > inode. AppArmor will need this.
>
> So you're once again switching vfs_ to a pass a vfsmount argument, this
> time hidden under struct path. It's really hard to grasp a "no"
> sometimes, isn't it? :)
>
The vfs-cleanups git tree is developed for passing "vfsmount" argument so that
r/o bind mounts shall not fail to check "vfsmount" by reconstructing vfs_*() callers
and marking vfs_*() as "static".
If this vfs-cleanups git tree has no problem regarding "vfsmount" argument,
I think there is no advantage of adding security_path_*() hooks inside the path_*() functions
since everybody calls the vfs_*() functions via path_*() functions.
Passing "vfsmount" to vfs_*() functions is better for AppArmor and TOMOYO and auditing purpose
(we can obtain the absolute pathname compared to the relative pathname from the mount point) than
adding security_path_*(), isn't it?
Are you worrying that there might be a case where the "vfsmount" argument passed to
path_*() functions is invalid or NULL?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists