Re: r-o bind in nfsd

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <viro@...>
Cc: <miklos@...>, <haveblue@...>, <linux-fsdevel@...>, <linux-kernel@...>, <neilb@...>, <akpm@...>, <hch@...>, <linux-security-module@...>, <jmorris@...>
Date: Friday, March 21, 2008 - 12:54 pm

> > > > I know there are a few cases, where filesystems call vfs_foo()

CC-d linux-security-module, James Morris.


Nobody wants to send vfsmounts to the filesystem.  But vfs_...() are
still part of the "upper layer", not the filesystem, so I'm not
convinced yet.  For example:

-extern int vfs_mkdir(struct inode *, struct dentry *, int);
+extern int vfs_mkdir(const struct path *, struct dentry *, int);

There's one caller of vfs_mkdir that can't do this: cgroup_clone().
But that can call cgroup_mkdir() instead.

And having the vfsmount available within vfs_...() functions means,
that the mnt_want_write() check can be moved inside, which means that
callers get simpler and less likely to be buggy.  Those are all
advantages IMO, regardless of any security module issues.

Miklos
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
r-o bind in nfsd, Miklos Szeredi, (Fri Mar 21, 10:59 am)
Re: r-o bind in nfsd, Al Viro, (Fri Mar 21, 11:54 am)
Re: r-o bind in nfsd, Miklos Szeredi, (Fri Mar 21, 12:24 pm)
Re: r-o bind in nfsd, Al Viro, (Fri Mar 21, 12:35 pm)
Re: r-o bind in nfsd, Miklos Szeredi, (Fri Mar 21, 12:54 pm)
Re: r-o bind in nfsd, Miklos Szeredi, (Fri Mar 21, 1:08 pm)
Re: r-o bind in nfsd, Al Viro, (Fri Mar 21, 2:11 pm)
Re: r-o bind in nfsd, Miklos Szeredi, (Fri Mar 21, 2:52 pm)
Re: r-o bind in nfsd, Dave Hansen, (Fri Mar 21, 5:08 pm)
Re: r-o bind in nfsd, Miklos Szeredi, (Fri Mar 21, 5:17 pm)
Re: r-o bind in nfsd, Al Viro, (Fri Mar 21, 3:49 pm)
Re: r-o bind in nfsd, Miklos Szeredi, (Fri Mar 21, 4:23 pm)
Re: r-o bind in nfsd, Tetsuo Handa, (Fri Mar 21, 10:20 pm)