[Devel] Re: [RFC][v8][PATCH 0/10] Implement clone3() system call

2009-10-22 Thread Eric W. Biederman
Sukadev Bhattiprolu writes: > Eric W. Biederman [ebied...@xmission.com] wrote: > | > | + if (target < RESERVED_PIDS) > | > > | > Should we replace RESERVED_PIDS with 0 ? We currently allow new > | > containers to have pids 1..32K in the first pass and in subsequent > | > passes assign start

[Devel] Re: [RFC][v8][PATCH 0/10] Implement clone3() system call

2009-10-22 Thread Sukadev Bhattiprolu
Eric W. Biederman [ebied...@xmission.com] wrote: | > | + if (target < RESERVED_PIDS) | > | > Should we replace RESERVED_PIDS with 0 ? We currently allow new | > containers to have pids 1..32K in the first pass and in subsequent | > passes assign starting at RESERVED_PIDS. | | If it is a preexistin

[Devel] [PATCH 3/3] use ckpt_error in checkpoint/restart.c

2009-10-22 Thread Serge E. Hallyn
In cases where f(x) always returns 0 or <0, I felt free to remove unconditional ckpt_debugs in favor of ckpt_error() only on error. Signed-off-by: Serge E. Hallyn --- checkpoint/restart.c | 90 - 1 files changed, 59 insertions(+), 31 deletions(-)

[Devel] [PATCH 2/3] define function to print error messages to user log

2009-10-22 Thread Serge E. Hallyn
Error messages are both sent to an optional user-provided logfile, and, if CONFIG_CHECKPOINT_DEBUG=y, sent to syslog. Signed-off-by: Serge E. Hallyn --- checkpoint/objhash.c |2 + checkpoint/sys.c | 61 ++--- include/linux/checkpo

[Devel] [PATCH 1/3] cr: debug: define ckpt_error()

2009-10-22 Thread Serge E. Hallyn
For starters it just amounts to a _ckpt_debug(CKPT_ERR), and has no callers. Signed-off-by: Serge E. Hallyn --- include/linux/checkpoint.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h index dfcb59b..351

[Devel] Re: [RFC][v8][PATCH 0/10] Implement clone3() system call

2009-10-22 Thread Eric W. Biederman
Sukadev Bhattiprolu writes: > Eric W. Biederman [ebied...@xmission.com] wrote: > | +static int set_pidmap(struct pid_namespace *pid_ns, int target) > | +{ > | + if (target >= pid_max) > | + return -1; > > I am changing this and the next return to 'return -EINVAL', to match > an earlie

[Devel] Re: [RFC][v8][PATCH 0/10] Implement clone3() system call

2009-10-22 Thread Sukadev Bhattiprolu
Eric W. Biederman [ebied...@xmission.com] wrote: | +static int set_pidmap(struct pid_namespace *pid_ns, int target) | +{ | + if (target >= pid_max) | + return -1; I am changing this and the next return to 'return -EINVAL', to match an earlier patch in my patchset. | + if (targ

[Devel] [PATCH] ipc_ind_to_str unused if !CONFIG_CHECKPOINT_DEBUG

2009-10-22 Thread Serge E. Hallyn
(compilation cleanup on top of fix-compile-with-CONFIG_CHECKPOINT_DEBUG-n.patch ) Signed-off-by: Serge E. Hallyn --- ipc/checkpoint.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ipc/checkpoint.c b/ipc/checkpoint.c index 8e6e9ba..ab9110a 100644 --- a/ipc/chec

[Devel] Re: [PATCH RFC] Send checkpoint and restart debug info to a log file (v2)

2009-10-22 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@librato.com): ... > > More practically, requiring userspace to pass over a flag > > consisting of CKPT_DBG_MEM|CKPT_DBG|FILE|CKPT_DBG|TASK, and > > handle corresponding usage flags, is not nice. > > I agree with you on about this. Maybe we want a better > interface ? I'

[Devel] Re: [RFC][v8][PATCH 9/10]: Define clone3() syscall

2009-10-22 Thread Sukadev Bhattiprolu
Michael Kerrisk [mtk.manpa...@googlemail.com] wrote: | Sukadev, | | On Wed, Oct 21, 2009 at 9:44 PM, Sukadev Bhattiprolu | wrote: | > H. Peter Anvin [...@zytor.com] wrote: | >> On 10/21/2009 01:26 PM, Michael Kerrisk wrote: | >>> | >>> My question here is: what does "3" actually mean? In general,

[Devel] [PATCH 1/1] fix compile with CONFIG_CHECKPOINT_DEBUG=n

2009-10-22 Thread Serge E. Hallyn
On the one hand, compiling without checkpoing debug saves a lot of kernel size: with debug: -rwxrwxr-x 1 hallyn hallyn 62391508 Oct 21 22:08 vmlinux without debug: -rwxrwxr-x 1 hallyn hallyn 62298077 Oct 21 22:33 vmlinux OTOH the need for this patch just proves my point that we don't want any

[Devel] Re: [PATCH 1/3] Checkpoint/restart epoll sets

2009-10-22 Thread Serge E. Hallyn
Quoting Matt Helsley (matth...@us.ibm.com): > On Tue, Oct 20, 2009 at 07:31:28PM -0500, Serge E. Hallyn wrote: > > Quoting Matt Helsley (matth...@us.ibm.com): > > > > > > +struct file* ep_file_restore(struct ckpt_ctx *ctx, > > > + struct ckpt_hdr_file *h) > > > +{ > > > + st

[Devel] Re: [RFC][v8][PATCH 9/10]: Define clone3() syscall

2009-10-22 Thread Matt Helsley
On Thu, Oct 22, 2009 at 02:14:16PM +0200, Michael Kerrisk wrote: > Peter, > > On Thu, Oct 22, 2009 at 1:38 PM, H. Peter Anvin wrote: > > On 10/22/2009 07:26 PM, Michael Kerrisk wrote: > >>> > >>> "3" is number of arguments. > >> > >> sys_clone3(struct clone_struct __user *ucs, pid_t __user *pids)

[Devel] Re: [RFC][v8][PATCH 9/10]: Define clone3() syscall

2009-10-22 Thread H. Peter Anvin
On 10/22/2009 09:14 PM, Michael Kerrisk wrote: > > So, sometimes, a number in a system call should be the bit width of > some arguments(s), sometimes it should be the number of arguments, and > sometimes (well, just occasionally, as in mmap2() and clone()) -- it > should be a version number? Does t

[Devel] Re: [RFC][v8][PATCH 9/10]: Define clone3() syscall

2009-10-22 Thread Michael Kerrisk
Peter, On Thu, Oct 22, 2009 at 1:38 PM, H. Peter Anvin wrote: > On 10/22/2009 07:26 PM, Michael Kerrisk wrote: >>> >>> "3" is number of arguments. >> >> sys_clone3(struct clone_struct __user *ucs, pid_t __user *pids) >> >> It appears to me that the number of arguments is 2. >> > > It was 3 at one

[Devel] Re: [RFC][v8][PATCH 9/10]: Define clone3() syscall

2009-10-22 Thread H. Peter Anvin
On 10/22/2009 07:26 PM, Michael Kerrisk wrote: >> >> "3" is number of arguments. > > sys_clone3(struct clone_struct __user *ucs, pid_t __user *pids) > > It appears to me that the number of arguments is 2. > It was 3 at one point... I'm not sure when that changed last :-/ >> It's better than "exte

[Devel] Re: [RFC][v8][PATCH 0/10] Implement clone3() system call

2009-10-22 Thread Daniel Lezcano
Oren Laadan wrote: > > Daniel Lezcano wrote: >> Oren Laadan wrote: >>> Daniel Lezcano wrote: >> [ ... ] >> I forgot to mention a constraint with the specified pid : P2 has to be child of P1. In other word, you can not specify a pid to clonat which is not your descendant (includi

[Devel] Re: [RFC][v8][PATCH 9/10]: Define clone3() syscall

2009-10-22 Thread Michael Kerrisk
Sukadev, On Wed, Oct 21, 2009 at 9:44 PM, Sukadev Bhattiprolu wrote: > H. Peter Anvin [...@zytor.com] wrote: >> On 10/21/2009 01:26 PM, Michael Kerrisk wrote: >>> >>> My question here is: what does "3" actually mean? In general, system >>> calls have not followed any convention of numbering to in

[Devel] Re: [RFC][v8][PATCH 9/10]: Define clone3() syscall

2009-10-22 Thread Michael Kerrisk
Peter, On Wed, Oct 21, 2009 at 3:03 PM, H. Peter Anvin wrote: > On 10/21/2009 01:26 PM, Michael Kerrisk wrote: >> >> My question here is: what does "3" actually mean? In general, system >> calls have not followed any convention of numbering to indicate >> successive versions -- clone2() being the