[lkml]   [2008]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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 <>
> >
> > 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?

 \ /
  Last update: 2008-05-31 12:51    [W:0.106 / U:3.468 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site