From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-kernel@vger.kernel.org,
Pavel Emelyanov <xemul@parallels.com>,
Glauber Costa <glommer@parallels.com>,
Andi Kleen <andi@firstfloor.org>, Tejun Heo <tj@kernel.org>,
Matt Helsley <matthltc@us.ibm.com>,
Pekka Enberg <penberg@kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Vasiliy Kulikov <segoon@openwall.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: [patch 2/4] proc: Show namespaces IDs in /proc/pid/ns/* files
Date: Wed, 4 Jan 2012 22:19:43 +0400 [thread overview]
Message-ID: <20120104181943.GJ2621@moon> (raw)
In-Reply-To: <m1pqezfj1z.fsf@fess.ebiederm.org>
On Wed, Jan 04, 2012 at 09:56:24AM -0800, Eric W. Biederman wrote:
...
> >
> > Hi Eric, thanks a lot for comments! I must admit I never though about
> > nested checkpoint/restore simply because even plain and direct CR still
> > has a number of problems which are not yet addressed.
> >
> > As to return such ID in ino field (if I understand you right -- you
> > propose to return such ID as inode of kstat structure) -- I don't think
> > it would be right either. Instead of one iteface applied to all objects
> > we export there will be a few different approaches instead -- for net-ns
> > it would be dev+ino, for tasks and other members of task-structure
> > it'll be IDs from /proc (as implemented in another patches). I like
> > more Kyle's idea about object_id() call which would simply return the
> > entrypted ID to user-space and it'll be up to user-space to do anything
> > it wants with such pieces of information.
>
> Right now everything thing that is exported is dev+ino. My objection
> is that you are adding yet another interface to get that information.
>
> I already have patches that already implement dev+ino for the namespaces
> so I fully expect that to happen independently of your patches. My
> priority is to get the rest of the namespaces exported which requires
> a bit more review.
>
Ah, good to know, could you please point me where I can get them and try
at least dev+ino part out?
> > Yes, there will be no way to restore such IDs later but the interface
> > is not supposed to work this way.
>
> It sounds like it won't be possible to retrofit the ability to restore
> the IDs later. If the path to what will be needed to support nested
> checkpoint/restore is not clear the user space interface is broken
> by design. And since it is broken by design I say the design needs
> to bake more before we think of baking it.
>
I'm not against of chaging/improving design at all. If there some other
ways to retrieve this kind of information I'm gladly dropping patches
piece-by-piece.
> > All this mess only because of lack
> > of way to figure out which task resources are shared and which are not.
> > Maybe if we can carry CLONE_ flags from copy_process()/unshare()/setns()
> > (and which else modify task resources?) inside task_struct and provide
> > these flags back to user-space we might not need the IDs helpers at all.
> > But I think such approach might end up in a pretty big patch bloating
> > the kernel. In turn I wanted to bring as minimum new functionality as
> > possible *with* a way to completely turn it off if user don't need it.
>
> The tricky case is file descriptors and file descriptors can be passed
> over unix domain sockets in arbitrary ways.
>
Not really, what about other members of task-structure, such as mm, files
and others? If I export this bits I have to export them somehow in a safe
way which would not reveal too much of kernel internals.
> If you can find a way to do this without id helpers that sounds like
> a good design.
>
Yes, I'm trying to find some other way but without much luck at moment.
Once I have something to show -- of course I send it to lkml immediately.
> I have a nasty feeling that by trying to do this piecemeal instead of
> in one big system call you are slowly painting yourself into a corner
> from which you can not get out.
>
Yes again, that was the reason the patches flew to LKML -- just
to obtain as much comments as possible and find some sane way.
Cyrill
next prev parent reply other threads:[~2012-01-04 18:19 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 12:47 [patch 0/4] generic object ids, v2 Cyrill Gorcunov
2011-12-23 12:47 ` [patch 1/4] Add routine for generating an ID for kernel pointer Cyrill Gorcunov
2011-12-27 23:23 ` Andrew Morton
2011-12-28 7:42 ` Cyrill Gorcunov
2011-12-28 9:42 ` Andrew Morton
2011-12-28 9:43 ` Cyrill Gorcunov
2011-12-28 9:47 ` Pavel Emelyanov
2011-12-28 10:41 ` Cyrill Gorcunov
2011-12-27 23:33 ` Andrew Morton
2011-12-28 0:48 ` Randy Dunlap
2011-12-28 7:24 ` Cyrill Gorcunov
2011-12-27 23:54 ` Valdis.Kletnieks
2011-12-28 0:02 ` Andrew Morton
2011-12-28 7:22 ` Cyrill Gorcunov
2011-12-28 16:06 ` Tejun Heo
2011-12-28 16:18 ` Cyrill Gorcunov
2011-12-28 16:26 ` Tejun Heo
2011-12-28 16:40 ` Cyrill Gorcunov
2011-12-28 16:45 ` Tejun Heo
2011-12-28 16:53 ` Cyrill Gorcunov
2011-12-28 17:01 ` Tejun Heo
2011-12-28 17:14 ` Cyrill Gorcunov
2011-12-29 14:24 ` Cyrill Gorcunov
2011-12-29 16:14 ` Tejun Heo
2011-12-29 16:24 ` Cyrill Gorcunov
2011-12-30 0:23 ` Herbert Xu
2011-12-30 7:36 ` Cyrill Gorcunov
2011-12-30 20:31 ` KOSAKI Motohiro
2011-12-30 20:48 ` Cyrill Gorcunov
2011-12-30 23:51 ` KOSAKI Motohiro
2011-12-31 7:51 ` Cyrill Gorcunov
2012-01-02 12:18 ` bastien ROUCARIES
2012-01-02 21:14 ` Cyrill Gorcunov
2011-12-31 4:55 ` Kyle Moffett
2011-12-31 7:57 ` Cyrill Gorcunov
2011-12-23 12:47 ` [patch 2/4] proc: Show namespaces IDs in /proc/pid/ns/* files Cyrill Gorcunov
2012-01-04 6:02 ` Eric W. Biederman
2012-01-04 11:26 ` Cyrill Gorcunov
2012-01-04 17:56 ` Eric W. Biederman
2012-01-04 18:19 ` Cyrill Gorcunov [this message]
2011-12-23 12:47 ` [patch 3/4] proc: Show open file ID in /proc/pid/fdinfo/* Cyrill Gorcunov
2011-12-23 12:47 ` [patch 4/4] proc: Show IDs of objects cloned with CLONE_ in proc Cyrill Gorcunov
-- strict thread matches above, loose matches on Subject: below --
2011-12-22 12:56 [patch 0/4] kernel generic object IDs series Cyrill Gorcunov
2011-12-22 12:56 ` [patch 2/4] proc: Show namespaces IDs in /proc/pid/ns/* files Cyrill Gorcunov
2011-11-17 9:55 [PATCH v2 0/4] Checkpoint/Restore: Show in proc IDs of objects that can be shared between tasks Pavel Emelyanov
2011-11-17 9:56 ` [PATCH 2/4] proc: Show namespaces IDs in /proc/pid/ns/* files Pavel Emelyanov
2011-11-15 11:35 [PATCH 0/4] Checkpoint/Restore: Show in proc IDs of objects that can be shared between tasks Pavel Emelyanov
2011-11-15 11:36 ` [PATCH 2/4] proc: Show namespaces IDs in /proc/pid/ns/* files Pavel Emelyanov
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=20120104181943.GJ2621@moon \
--to=gorcunov@gmail.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=ebiederm@xmission.com \
--cc=eric.dumazet@gmail.com \
--cc=glommer@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthltc@us.ibm.com \
--cc=penberg@kernel.org \
--cc=segoon@openwall.com \
--cc=tj@kernel.org \
--cc=xemul@parallels.com \
/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 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.