Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Cyrill Gorcunov <gorcunov <at> openvz.org>
Subject: [patch 0/4] kernel generic object IDs series
Newsgroups: gmane.linux.kernel
Date: Thursday 22nd December 2011 12:56:39 UTC (over 4 years ago)
Hi,

when we do the checkpoint-restore we need to find out if various kernel
objects
(like mm_struct-s of file_struct-s) are shared between tasks (and restore
them
after).

While at restore time we can use CLONE_XXX flags and unshare syscall there
is
no way to find out sharing structures at checkpoint time. Thus, to chop the
knit, we introduce generic-object-ids helpers which do basically encode
kernel pointers into some form (at moment is's simple XOR operation over
a random cookie value) and provide them back to userspace. So one can test
if two resource are shared between different task.

Since such information is pretty valuable -- it's allowed for CAP_SYS_ADMIN
only since xor encoded values has nothing to do with security but used only
to break an impression that ID means something other than random "number"
which should be used for "sameness" test only and nothing else.

The following objects are shown at the moment

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

Any kind of comments and especially complains (!) are very appreciated!

Cyrill
 
CD: 3ms