mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrei Vagin <avagin@virtuozzo.com>
Cc: Andrei Vagin <avagin@openvz.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-api@vger.kernel.org>, <criu@openvz.org>,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] fs: add an ioctl to get an owning userns for a superblock
Date: Wed, 10 May 2017 20:24:00 -0500	[thread overview]
Message-ID: <87efvwkwy7.fsf@xmission.com> (raw)
In-Reply-To: <20170511001526.GA7992@outlook.office365.com> (Andrei Vagin's message of "Wed, 10 May 2017 17:15:27 -0700")

Andrei Vagin <avagin@virtuozzo.com> writes:

> On Tue, May 09, 2017 at 07:34:00PM -0500, Eric W. Biederman wrote:
>> Andrei Vagin <avagin@openvz.org> writes:
>> 
>> > The introduced ioctl returns a file descriptor that refers to a owning
>> > user namespace for a superblock which is associated with a target file
>> > descriptor.
>> >
>> > EPERM is returned if the current process doesn't have CAP_SYS_ADMIN in
>> > the returned user namespace.
>> >
>> > This information is required to dump and restore mount namespaces. We
>> > need to know to which user namespace a superblock is belonged to.
>> >
>> > We already have the SIOCGSKNS ioctl for sockets to get a network
>> > namespace, so it looks reasonable to use the same interface for
>> > superblocks too.
>> >
>> > This functionality can be useful for users in order to understand
>> > a running system.
>> 
>> This will probably work.  And the capability check eases any concerns
>> I might have that this would be a trivial information leak.
>> 
>> That said can we hold off just a little bit.  If open_fs work actually
>> turns into a real interface that would seem to be the perfect place
>> to stick this functionality.
>
> Sure, we can. Do you know any place where to read more information about
> open_fs? I think I have heared a few times about this idea, but it would be
> good to get more details.


Look for David Howells <dhowells@redhat.com> recent patches on lkml he
has implemented an initial rfc for it.

Eric

      reply	other threads:[~2017-05-11  1:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09 23:19 Andrei Vagin
2017-05-10  0:34 ` Eric W. Biederman
2017-05-11  0:15   ` Andrei Vagin
2017-05-11  1:24     ` Eric W. Biederman [this message]

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=87efvwkwy7.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=avagin@openvz.org \
    --cc=avagin@virtuozzo.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=criu@openvz.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

Powered by JetHome