[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-30 Thread Matt Helsley
On Fri, Apr 24, 2009 at 04:06:08PM -0500, Serge E. Hallyn wrote: Hey Alexey and Oren, here is my proposal for a patch on top of Oren's tree to do the leak checking by default (basically the same way it was done in Alexey's patchset). It also by default explicitly requires CAP_SYS_ADMIN for

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-30 Thread Serge E. Hallyn
Quoting Matt Helsley (matth...@us.ibm.com): On Fri, Apr 24, 2009 at 04:06:08PM -0500, Serge E. Hallyn wrote: Thanks for taking a look, Matt. Oren has done some nice work to it in his ckpt-v14, please take a look there. + cnt = ref-users + 1; Perhaps this switch is another candidate for

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-30 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Matt Helsley (matth...@us.ibm.com): On Fri, Apr 24, 2009 at 04:06:08PM -0500, Serge E. Hallyn wrote: Thanks for taking a look, Matt. Oren has done some nice work to it in his ckpt-v14, please take a look there. + cnt = ref-users + 1; Perhaps this

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-30 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): Hmmm... IIUC from the text above then: ptr = mmap(NULL, size, MMAP_EXEC | ... ) memcpy(ptr, src, size); mremap(src, size, size, MREMAP_FIXED | ..., ptr); What is src and size? src is the address of a

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-27 Thread Nathan Lynch
Serge E. Hallyn se...@hallyn.com writes: Quoting Nathan Lynch (n...@pobox.com): Serge E. Hallyn se...@us.ibm.com writes: + cnt = ref-users + 1; + switch (ref-type) { + case CR_OBJ_UTSNS: + utsns = ref-ptr; + cnt2 = (unsigned long) atomic_read(utsns-kref.refcount);

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-27 Thread Serge E. Hallyn
Quoting Nathan Lynch (n...@pobox.com): Serge E. Hallyn se...@hallyn.com writes: Quoting Nathan Lynch (n...@pobox.com): Serge E. Hallyn se...@us.ibm.com writes: +cnt = ref-users + 1; +switch (ref-type) { +case CR_OBJ_UTSNS: +utsns = ref-ptr;

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-27 Thread Nathan Lynch
Serge E. Hallyn se...@us.ibm.com writes: Quoting Nathan Lynch (n...@pobox.com): Serge E. Hallyn se...@hallyn.com writes: Now it's possible that at the *start* of the checkpoint there was another task, not being checkpointed and not frozen, in the utsns, and it exited before the leaks check

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-27 Thread Alexey Dobriyan
On Mon, Apr 27, 2009 at 01:07:17PM -0500, Serge E. Hallyn wrote: Heh, because there is no such thing as a 'container'. Oh, yes, there is. Set of tasks shares set of uts_ns, ipc_ns, mnt_ns, pid_ns and net_ns. No other task shares this set. Pid_ns set has tree hierarchy. All user_ns which come

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-27 Thread Oren Laadan
Serge E. Hallyn wrote: Hey Alexey and Oren, here is my proposal for a patch on top of Oren's tree to do the leak checking by default (basically the same way it was done in Alexey's patchset). It also by default explicitly requires CAP_SYS_ADMIN for both checkpoint and restart. I think

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-27 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): Serge E. Hallyn wrote: Quoting Nathan Lynch (n...@pobox.com): Serge E. Hallyn se...@hallyn.com writes: Quoting Nathan Lynch (n...@pobox.com): Serge E. Hallyn se...@us.ibm.com writes: + cnt = ref-users + 1; + switch

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-26 Thread Serge E. Hallyn
Quoting Serge E. Hallyn (se...@hallyn.com): There's no need for a sysctl disallowing the CHECKPOINT_SUBTREE flag. There should just be a unprivileged_checkpoint sysctl determining whether CAP_SYS_ADMIN is always needed. Then the optional CHECKPOINT_SUBTREE is always allowed. That makes

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-24 Thread Nathan Lynch
Serge E. Hallyn se...@us.ibm.com writes: Define a CHECKPOINT_SUBTREE flag for sys_checkpoint() which says it's ok if the the checkpointed set of tasks are not a fully isolated container without leaks. Define a sysctl 'ckpt_subtree_allowed' which determines whether subtree checkpoints are ok.

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-24 Thread Serge E. Hallyn
Quoting Nathan Lynch (n...@pobox.com): Serge E. Hallyn se...@us.ibm.com writes: Define a CHECKPOINT_SUBTREE flag for sys_checkpoint() which says it's ok if the the checkpointed set of tasks are not a fully isolated container without leaks. Define a sysctl 'ckpt_subtree_allowed' which