From: Andrei Vagin <avagin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
Michael Kerrisk
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Linux Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
Linux API <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-fsdevel
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org"
<criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
Serge Hallyn
<serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Subject: How to get an owning userns for a superblock
Date: Mon, 1 May 2017 17:05:56 -0700 [thread overview]
Message-ID: <CANaxB-zFNSjZYhBNJt_hAewrvi2=0RHQ_oY0mTinWe4=9P=ieA@mail.gmail.com> (raw)
Hello Everyone,
Now superblock has a reference to userns. Is there a way to discover
an owning userns for a superblock from user-space? In CRIU, we need
this information to dump and restore mount namespaces. For other
users, this information can be useful too to analyze and understand
the running system.
Recently we solved a similar problem for namespaces:
https://lkml.org/lkml/2016/7/6/158
In that case, we added two ioctl-s for nsfs files. Here we have a deal
regular files and I am not sure that adding a new ioctl for them is a
good idea.
Another way to solve a problem is use the kcmp() system call. We will
need to add two commands. One is to compare user namespaces and
another one is to compare a supper block userns with another userns.
The first command is required to create a sorted list of user
namespaces and the second command allows to find a proper userns in
this list.
Maybe someone has a better idea about this?
Thanks,
Andrei
reply other threads:[~2017-05-02 0:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CANaxB-zFNSjZYhBNJt_hAewrvi2=0RHQ_oY0mTinWe4=9P=ieA@mail.gmail.com' \
--to=avagin-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.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).