All of lore.kernel.org
 help / color / mirror / Atom feed
* How to get an owning userns for a superblock
@ 2017-05-02  0:05 Andrei Vagin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrei Vagin @ 2017-05-02  0:05 UTC (permalink / raw)
  To: Eric W. Biederman, Michael Kerrisk, Linux Containers, Linux API,
	linux-fsdevel, criu-GEFAQzZX7r8dnm+yROfE0A, Serge Hallyn

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* How to get an owning userns for a superblock
@ 2017-05-02  0:05 ` Andrei Vagin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrei Vagin @ 2017-05-02  0:05 UTC (permalink / raw)
  To: Eric W. Biederman, Michael Kerrisk, Linux Containers, Linux API,
	linux-fsdevel, criu, Serge Hallyn

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* How to get an owning userns for a superblock
@ 2017-05-02  0:05 ` Andrei Vagin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrei Vagin @ 2017-05-02  0:05 UTC (permalink / raw)
  To: Eric W. Biederman, Michael Kerrisk, Linux Containers, Linux API,
	linux-fsdevel, criu-GEFAQzZX7r8dnm+yROfE0A, Serge Hallyn

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-02  0:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02  0:05 How to get an owning userns for a superblock Andrei Vagin
  -- strict thread matches above, loose matches on Subject: below --
2017-05-02  0:05 Andrei Vagin
2017-05-02  0:05 ` Andrei Vagin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.