Skip to content

kernel generic object IDs series

Cyrill Gorcunov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 of 4 patches 7 repliesIn review

3 of 4 patches are in this archive. The cover letter announces 4.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add routine for generating an ID for kernel pointerinclude/linux/mm.h mm/Kconfig mm/util.c+75 -05 replies
2/4proc: Show namespaces IDs in /proc/pid/ns/* filesDocumentation/filesystems/proc.txt fs/proc/namespaces.c include/linux/mm.h+46 -00 replies
3/4proc: Show open file ID in /proc/pid/fdinfo/*fs/proc/base.c include/linux/mm.h+30 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/4] kernel generic object IDs series

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