linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: hch@infradead.org, viro@zeniv.linux.org.uk, adilger@sun.com,
	corbet@lwn.net, linux-fsdevel@vger.kernel.org,
	sfrench@us.ibm.com
Subject: Re: [PATCH -V3] Generic name to handle and open by handle syscalls
Date: Fri, 23 Apr 2010 17:15:12 +0530	[thread overview]
Message-ID: <87k4ryjstz.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100422224958.GA22130@us.ibm.com>

On Thu, 22 Apr 2010 17:49:58 -0500, "Serge E. Hallyn" <serue@us.ibm.com> wrote:
> Quoting Aneesh Kumar K.V (aneesh.kumar@linux.vnet.ibm.com):
> > Hi,
> > 
> > The below set of patches implement open by handle support using exportfs
> > operations. This allows user space application to map a file name to file 
> > handle and later open the file using handle. This should be usable
> > for userspace NFS [1] and 9P server [2]. XFS already support this with the ioctls
> > XFS_IOC_PATH_TO_HANDLE and XFS_IOC_OPEN_BY_HANDLE.
> > 
> > [1] http://nfs-ganesha.sourceforge.net/
> > [2] http://lists.gnu.org/archive/html/qemu-devel/2010-03/msg01087.html
> > 
> > TODO:
> > I guess we would need to optimize how we get the vfsmount for the filesystem
> > uuid specified. Searching the file system list and task name space may be a big
> > overhead for each open by handle call.
> > 
> > Chages from V2:
> > a) Support system wide unique handle.
> > 
> > Changes from v1:
> > a) handle size is now specified in bytes
> > b) returns -EOVERFLOW if the handle size is small
> > c) dropped open_handle syscall and added open_by_handle_at syscall
> >    open_by_handle_at takes mount_fd as the directory fd of the mount point
> >    containing the file
> > e) handle will only be unique in a given file system. So for an NFS server
> >    exporting multiple file system, NFS server will have to internally track the
> >    mount point to which a file handle belongs to. We should be able to do it much
> >    easily than expecting kernel to give a system wide unique file handle. System
> >    wide unique file handle would need much larger changes to the exportfs or VFS
> >    interface and I was not sure whether we really need to do that in the kernel or
> >    in the user space
> > f) open_handle_at now only check for DAC_OVERRIDE capability
> 
> Hi Aneesh,
> 
> it still scares me a bit as I expect to see some privileged userspace
> daemon accept (forged) handles from unprivileged users and pass back
> open fds, but adding some random token to prevent that would require
> storing it, so I think you're doing what you reasonably can by
> requiring DAC_OVERRIDE.

We still do access permission check using the file permission
modes. What we don't do is to check the execute (x) bit on the
directory. But the idea of adding DAC_OVERRIDE is to make sure
that we allow only privileged user to use the open by handle interface.


> 
> nsproxy bit looks fine, and i saw no problems in the rest of the set.
> As Andreas was saying I don't see why you're calling it _at, but
> meanwhile
> 
> Acked-by: Serge Hallyn <serue@us.ibm.com>


I missed adding Acked-by:  in V4 iteration. But will add in V5
iteration. Can i add the same to all the patches ? Or do you want me to
add only to the nsproxy bits.

> 
> to the set.
> 
> -serge

-aneesh

  reply	other threads:[~2010-04-23 11:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 18:15 [PATCH -V3] Generic name to handle and open by handle syscalls Aneesh Kumar K.V
2010-04-22 18:15 ` [PATCH -V3 1/5] exportfs: Return the minimum required handle size Aneesh Kumar K.V
2010-04-22 18:15 ` [PATCH -V3 2/5] vfs: Add name to file handle conversion support Aneesh Kumar K.V
2010-04-22 18:15 ` [PATCH -V3 3/5] vfs: Add open by file handle support Aneesh Kumar K.V
2010-04-22 19:22   ` Andreas Dilger
2010-04-23 11:40     ` Aneesh Kumar K. V
2010-04-22 18:15 ` [PATCH -V3 4/5] x86: Add new syscalls for x86_32 Aneesh Kumar K.V
2010-04-22 18:15 ` [PATCH -V3 5/5] ext4: Add get_fsid callback Aneesh Kumar K.V
2010-04-22 19:07 ` [PATCH -V3] Generic name to handle and open by handle syscalls Andreas Dilger
2010-04-22 22:49 ` Serge E. Hallyn
2010-04-23 11:45   ` Aneesh Kumar K. V [this message]
2010-04-23 13:49     ` Serge E. Hallyn
2010-04-23 13:23 ` Theodore Tso
2010-04-24  0:19   ` Andreas Dilger
2010-04-24  1:08     ` Neil Brown
2010-04-25 18:21       ` Aneesh Kumar K. V
2010-04-26  9:56       ` Christoph Hellwig
2010-04-26 10:16         ` Neil Brown
2010-04-26 10:28           ` Christoph Hellwig
2010-04-26 11:16             ` Neil Brown
2010-04-26 14:53               ` Theodore Tso
2010-04-26 14:56                 ` Christoph Hellwig
2010-04-25 18:07     ` Aneesh Kumar K. V

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=87k4ryjstz.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=adilger@sun.com \
    --cc=corbet@lwn.net \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=serue@us.ibm.com \
    --cc=sfrench@us.ibm.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 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).