From: Al Viro <viro@ZenIV.linux.org.uk>
To: Alan Jenkins <alan.christopher.jenkins@gmail.com>
Cc: David Howells <dhowells@redhat.com>,
linux-api@vger.kernel.org, torvalds@linux-foundation.org,
ebiederm@xmission.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, mszeredi@redhat.com
Subject: Re: [PATCH 31/34] vfs: syscall: Add fspick() to select a superblock for reconfiguration [ver #12]
Date: Sat, 13 Oct 2018 07:11:41 +0100 [thread overview]
Message-ID: <20181013061141.GR32577@ZenIV.linux.org.uk> (raw)
In-Reply-To: <9b8bf436-65de-13b9-0002-0479d11c18ca@gmail.com>
On Fri, Oct 12, 2018 at 03:49:50PM +0100, Alan Jenkins wrote:
> > +SYSCALL_DEFINE3(fspick, int, dfd, const char __user *, path, unsigned int, flags)
> > +{
> > + struct fs_context *fc;
> > + struct path target;
> > + unsigned int lookup_flags;
> > + int ret;
> > +
> > + if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN))
> > + return -EPERM;
>
>
> This seems to accept basically any mount. Specifically: are you sure it's
> OK to return a handle to a SB_NO_USER superblock?
Umm... As long as we don't try to do pathname resolution from its ->s_root,
shouldn't be a problem and I don't see anything that would do that. I might've
missed something, but...
next prev parent reply other threads:[~2018-10-13 6:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 16:30 [PATCH 00/34] VFS: Introduce filesystem context [ver #12] David Howells
2018-09-21 16:30 ` [PATCH 01/34] vfs: syscall: Add open_tree(2) to reference or clone a mount " David Howells
2018-10-21 16:41 ` Eric W. Biederman
2018-09-21 16:30 ` [PATCH 02/34] vfs: syscall: Add move_mount(2) to move mounts around " David Howells
2018-09-21 16:33 ` [PATCH 26/34] vfs: syscall: Add fsopen() to prepare for superblock creation " David Howells
2018-09-21 16:34 ` [PATCH 29/34] vfs: syscall: Add fsconfig() for configuring and managing a context " David Howells
2018-09-21 16:34 ` [PATCH 30/34] vfs: syscall: Add fsmount() to create a mount for a superblock " David Howells
2018-09-21 16:34 ` [PATCH 31/34] vfs: syscall: Add fspick() to select a superblock for reconfiguration " David Howells
2018-10-12 14:49 ` Alan Jenkins
2018-10-13 6:11 ` Al Viro [this message]
2018-10-13 9:45 ` Alan Jenkins
2018-10-13 23:04 ` Andy Lutomirski
2018-10-17 13:15 ` David Howells
2018-10-17 13:20 ` David Howells
2018-10-17 14:31 ` Alan Jenkins
2018-10-17 14:35 ` Eric W. Biederman
2018-10-17 14:55 ` Alan Jenkins
2018-10-17 15:24 ` David Howells
2018-10-17 15:38 ` Eric W. Biederman
2018-10-17 15:45 ` David Howells
2018-10-17 17:41 ` Alan Jenkins
2018-10-17 21:20 ` David Howells
2018-10-17 22:13 ` Alan Jenkins
2018-10-04 18:37 ` [PATCH 00/34] VFS: Introduce filesystem context " Eric W. Biederman
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=20181013061141.GR32577@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=alan.christopher.jenkins@gmail.com \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=torvalds@linux-foundation.org \
/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).