linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Checkpoint/Restore: Show in proc IDs of objects that can be shared between tasks
@ 2011-11-15 11:35 Pavel Emelyanov
  2011-11-15 11:36 ` [PATCH 1/4] Routine for generating an safe ID for kernel pointer Pavel Emelyanov
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Pavel Emelyanov @ 2011-11-15 11:35 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Cyrill Gorcunov, Glauber Costa, Andi Kleen, Tejun Heo,
	Andrew Morton, Matt Helsley

While doing the checkpoint-restore in the userspace one need to determine
whether various kernel objects (like mm_struct-s of file_struct-s) are shared
between tasks and restore this state.

The 2nd step can for now be solved by using respective CLONE_XXX flags and
the unshare syscall, while there's currently no ways for solving the 1st one.

One of the ways for checking whether two tasks share e.g. an mm_struct is to
provide some mm_struct ID of a task to its proc file. The best from the
performance point of view ID is the object address in the kernel, but showing
them to the userspace is not good for performance reasons.

The previous attempt to solve this was to generate an ID for slab/slub and then
mix it up with the object index on the slab page. This attempt wasn't met
warmly by slab maintainers, so here's the 2nd approach.

The object address is XOR-ed with a "random" value of the same size and then
shown in proc. Providing this poison is not leaked into the userspace then
ID seem to be safe.

The other change from the previous set - this now includes patches from /proc
to show the IDs generated. The objects for which the IDs are shown are:

* all namespaces living in /proc/pid/ns/
* open files (shown in /proc/pid/fdinfo/)
* objects, that can be shared with CLONE_XXX flags (except for namespaces)

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>


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

end of thread, other threads:[~2011-11-18 23:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 1/4] Routine for generating an safe ID for kernel pointer Pavel Emelyanov
2011-11-15 11:38   ` Pekka Enberg
2011-11-15 11:44     ` Pavel Emelyanov
2011-11-15 11:51       ` Pekka Enberg
2011-11-15 15:13   ` Eric Dumazet
2011-11-15 15:20   ` Tejun Heo
2011-11-15 11:36 ` [PATCH 2/4] proc: Show namespaces IDs in /proc/pid/ns/* files Pavel Emelyanov
2011-11-15 11:37 ` [PATCH 3/4] proc: Show open file ID in /proc/pid/fdinfo/* Pavel Emelyanov
2011-11-16  5:44 ` [PATCH 0/4] Checkpoint/Restore: Show in proc IDs of objects that can be shared between tasks Matt Helsley
2011-11-16  6:19   ` Cyrill Gorcunov
2011-11-16  8:25   ` Pavel Emelyanov
2011-11-18 23:25     ` Matt Helsley

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).