[Devel] [PATCH] linux-cr: Handle nested pid namespaces

2010-03-11 Thread serue
From: Serge E. Hallyn In place of one big pids array, checkpoint one struct ckpt_hdr_pids per task. It contains pid/ppid/etc in the root nsproxy's pidns, and is followed by a list of all virtual pids in child pid namespaces, if any. When an nsproxy is created during do_restore_ns(), we don't ye

[Devel] [PATCH] user-cr: Handle nested pid namespaces

2010-03-11 Thread serue
From: Serge Hallyn Yup, the kernel doesn't actually care about the vpids in all the child pid namespaces, they're actually just for us. We parse them to decide how to tell eclone to recreate the full hierarchical pid and pidns trees. Signed-off-by: Serge Hallyn --- include/linux/checkpoint_hd

[Devel] cr: handle nested pid namespaces

2010-03-11 Thread serue
This patchset (one for kernel, one for user-cr) makes checkpoint/restart of containers with nested pid namespaces work. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] [PATCH 6/9] Make AT_VECTOR_SIZE_ARCH 2 for x86-32

2010-02-08 Thread serue
From: Serge E. Hallyn Both x86-32 and x86-64 with 32-bit compat use ARCH_DLINFO_IA32, which defines two saved_auxv entries. But system.h only defines AT_VECTOR_SIZE_ARCH as 2 for CONFIG_IA32_EMULATION, not for CONFIG_X86_32. Fix that. Signed-off-by: Serge E. Hallyn --- arch/x86/include/asm/s

[Devel] [PATCH 8/9] fix potential use-before-set ret in arch/x86/vdso/vma.c

2010-02-08 Thread serue
From: Serge E. Hallyn (should be folded into "c/r: extend arch_setup_additional_pages()" ) Signed-off-by: Serge E. Hallyn --- arch/x86/vdso/vma.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c index 393b22a..b10ed32 1

[Devel] [PATCH 9/9] mm/mmap.c:do_munmap(): remove unused local vars

2010-02-08 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- mm/mmap.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 89c3d9c..75f5de3 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2014,9 +2014,6 @@ int do_munmap_nocheck(struct mm_struct *mm, uns

[Devel] [PATCH 0/9] ckpt-v19-rc3 cleanups

2010-02-08 Thread serue
Sorry, some of these I've sent before, but here is the set I currently have on top of ckpt-v19-rc3. Boy is this painful - there are at least still 32->64 or vice-versa problems with: ipc_shm restore, signals (I think) and, in 32-bit restore of a x86-64 32-bit image, restore_cpu. I'll keep pushing

[Devel] [PATCH 5/9] use ckpt_err for architecture mismatch errors

2010-02-08 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- arch/x86/kernel/checkpoint.c |4 +++- checkpoint/restart.c | 18 ++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/checkpoint.c b/arch/x86/kernel/checkpoint.c index 961b131..7

[Devel] [PATCH 4/9] x86_32: add TIF_IA32 to thread flags

2010-02-08 Thread serue
From: Serge E. Hallyn X86-32 does not set TIF_IA32 on tasks. But since we now use the same CKPT_ARCH_ID for X86-32 and X86-64, this means that when we restart a task from X86-32 on X86-64, we can't tell that it should have been 32-bit. So always set TIF_IA32 in thread_info_flags for a task when

[Devel] [PATCH 1/9] Use CKPT_ARCH_X86_32 for all x86 CKPT_ARCH_IDs

2010-02-08 Thread serue
From: Serge E. Hallyn Sure we can rename it eventually, but I'm still just experimenting... Signed-off-by: Serge E. Hallyn --- arch/x86/include/asm/checkpoint_hdr.h |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/checkpoint_hdr.h b/arch/x86/i

[Devel] [PATCH 2/9] restart only same bit-ness

2010-02-08 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- arch/x86/kernel/checkpoint.c | 21 +++-- 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/checkpoint.c b/arch/x86/kernel/checkpoint.c index 5952e27..b01a2fc 100644 --- a/arch/x86/kernel

[Devel] [PATCH 7/9] cr: checkpoint saved_auxv as u64s

2010-02-08 Thread serue
From: Serge E. Hallyn unsigned longs are not a good value to checkpoint between x86-32 and x86-64 32-bit tasks :) Signed-off-by: Serge E. Hallyn --- checkpoint/checkpoint.c|5 +-- checkpoint/memory.c| 53 +-- checkpoint/restart.c

[Devel] [PATCH 3/9] x86_64: keep __u32s in even groups

2010-02-08 Thread serue
From: Serge E. Hallyn Otherwise the struct will be different size on x86-32 and x86-64. Signed-off-by: Serge E. Hallyn --- include/linux/checkpoint_hdr.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/checkpoint_hdr.h b/include/linux/checkpoint_hdr.

[Devel] [PATCH 2/4] restart only same bit-ness

2010-01-25 Thread serue
From: Serge E. Hallyn I'm hoping to get restart of 32-bit tasks on x86-64 working for v19, but restart of 32-bit tasks using a 64-bit restart program I'm not going to even try right now. Rather than get a completely uncommented '-22' return value from restore_cpu() or do_munmap(), catch it early

[Devel] [PATCH 3/4] x86_64: make some changes to fs/gs register handling

2010-01-25 Thread serue
From: Serge E. Hallyn 1. always save/restore fs/gs not just if CONFIG_COMPAT and the task is 64-bit. Pretty sure that block wasn't doing what it wanted to do anyway :) 2. use rdmsrl for fs/gs for self-checkpoint other code seems to do it. It doesn't seem to make

[Devel] [PATCH 1/4] x86-32 and ia32 eclone, checkpoint, restart fixes

2010-01-25 Thread serue
From: Serge E. Hallyn Eclone on x86-32 should use esi for 4th arg (upids), not edi, which is 5th arg. This will require a corresponding fix to user-cr, but (a) it's correct and (b) it's required so that IA32_ARG_FIXUP can put upids in the right register for process_64.c:sys_eclone(). IA32_ARG_F

[Devel] [RFC] c/r: 32-bit support on x86-64

2010-01-25 Thread serue
The first patch is a resend from friday, and should be applied to v19. The second patch I think should be applied to v19 as well, as it will prevent accidental attempts to restart a 64-bit image with a 32-bit restart, and vice versa. The third patch I think does things which need to be done, but

[Devel] [PATCH 2/2] sem restore: don't free sma if it's an error

2010-01-12 Thread serue
From: Serge Hallyn Signed-off-by: Serge Hallyn --- ipc/checkpoint_sem.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/ipc/checkpoint_sem.c b/ipc/checkpoint_sem.c index 53a19ed..395c84d 100644 --- a/ipc/checkpoint_sem.c +++ b/ipc/checkpoint_sem.c @@ -186,6 +186,7 @@ in

[Devel] [PATCH 1/2] m_type is long, not int

2010-01-12 Thread serue
From: Serge Hallyn So make sure we store a field big enough on 64-bit arch. Signed-off-by: Serge Hallyn --- include/linux/checkpoint_hdr.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/checkpoint_hdr.h b/include/linux/checkpoint_hdr.h index 314d967..a8

[Devel] [PATCH 6/6] have ckpt_err set ctx->errno

2009-11-17 Thread serue
From: Serge E. Hallyn Move setting of ctx->errno into do_ckpt_msg(). If the operation is a restart, and errno was previously unset, then also wake all waiting callers so they know to quit. NOTE that the way this is set up, users of _ckpt_err().._ckpt_msg_complete() do not cause restore_wake_all

[Devel] [PATCH 1/6] add image offset to ckpt_err output

2009-11-17 Thread serue
From: Serge E. Hallyn Changelog: Nov 17: check for len overrun Signed-off-by: Serge E. Hallyn --- checkpoint/sys.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/checkpoint/sys.c b/checkpoint/sys.c index c1c4e99..d64f5a7 100644 --- a/checkpoint/sys.c +++ b/ch

[Devel] [PATCH 3/6] use ckpt_err in ckpt_read_obj_type()

2009-11-17 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/restart.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/checkpoint/restart.c b/checkpoint/restart.c index 4af4647..b684d7a 100644 --- a/checkpoint/restart.c +++ b/checkpoint/restart.c @@ -416,11

[Devel] [PATCH 5/6] define ckpt_obj_try_fetch

2009-11-17 Thread serue
From: Serge E. Hallyn Which doesn't ckpt_err() on failure. Also have callers which want to, probe with _lite(), not ckpt_obj_fetch(). This is needed before the next patch, which will make ckpt_err() with non-zero err bail a restart. Signed-off-by: Serge E. Hallyn --- checkpoint/objhash.c

[Devel] [PATCH 2/6] use ckpt_err in ckpt_obj_fetch()

2009-11-17 Thread serue
From: Serge E. Hallyn Changelog: Nov 17: print requested obj type Signed-off-by: Serge E. Hallyn --- checkpoint/objhash.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/checkpoint/objhash.c b/checkpoint/objhash.c index 9b1b2f4..2e50025 100644 --- a/c

[Devel] [PATCH 4/6] Move init_completion(&ctx->complete) to ctx_alloc

2009-11-17 Thread serue
From: Serge E. Hallyn That way we don't risk indirectly calling complete(&ctx->complete) (through ckpt_err()) before ctx->complete has been initialized. Signed-off-by: Serge E. Hallyn --- checkpoint/restart.c |2 -- checkpoint/sys.c |4 2 files changed, 4 insertions(+), 2 dele

[Devel] [PATCH user-cr 1/2] use v13 of eclone in clone_s390x.c

2009-11-12 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- clone_s390x.c | 100 ++-- 1 files changed, 68 insertions(+), 32 deletions(-) diff --git a/clone_s390x.c b/clone_s390x.c index dada822..945a98d 100644 --- a/clone_s390x.c +++ b/clone_s3

[Devel] [PATCH user-cr 2/2] add nsexeccwp to test clone-with-pids

2009-11-12 Thread serue
From: Serge E. Hallyn One of the concerns with clone-with-pids is whether the stack handling is all correct and robust enough to withstand real usage. Little testcases playing with pid values are also necessary, but can't replace really using clone-with-pids to start a shell from which to keep w

[Devel] [PATCH linux-cr] implement s390 eclone syscall

2009-11-12 Thread serue
From: Serge E. Hallyn This patch implements the s390 hook for sys_eclone. The user-space clone-with-pids glue for s390 (clone_s390x.c from the user-cr package) is now: struct pid_set { int num_pids; pid_t *pids; }; #define do_eclone(flags, pids, args, sz) \ ( { \ register un

[Devel] [PATCH 2/4] cr: add generic LSM c/r support (v7)

2009-11-11 Thread serue
From: Serge E. Hallyn Documentation/checkpoint/readme.txt begins: """ Application checkpoint/restart is the ability to save the state of a running application so that it can later resume its execution from the time at which it was checkpointed. """ This patch adds generic support for c/r of LSM

[Devel] [PATCH user-cr] restart: accept the lsm_name field in header and add -k flag (v2)

2009-11-11 Thread serue
From: Serge E. Hallyn The checkpoint file header now has an 11-character string containing the name of the active LSM, following the uts info, and a variable length buffer type conaining LSM-specific version information (for instance a sha1sum of policy). Handle these. Also add a -k (--keeplsm)

[Devel] [PATCH 3/4] cr: add smack support to lsm c/r (v4)

2009-11-11 Thread serue
From: Serge E. Hallyn Documentation/checkpoint/readme.txt begins: """ Application checkpoint/restart is the ability to save the state of a running application so that it can later resume its execution from the time at which it was checkpointed. """ This patch implements checkpoint and restore of

[Devel] [PATCH 4/4] cr: add selinux support (v6)

2009-11-11 Thread serue
From: Serge E. Hallyn Documentation/checkpoint/readme.txt begins: """ Application checkpoint/restart is the ability to save the state of a running application so that it can later resume its execution from the time at which it was checkpointed. """ This patch adds the ability to checkpoint and r

[Devel] [PATCH 1/4] add lsm name and lsm_info (policy header) to container info

2009-11-11 Thread serue
From: Serge E. Hallyn The LSM name is 'selinux', 'smack', 'tomoyo', or 'dummy'. We add that to the container configuration section. We also add a LSM policy configuration section. That is placed after the LSM name. It is written by the LSM in security_checkpoint_header(), called during checkp

[Devel] [PATCH 0/4] Introduction: LSM c/r patchset

2009-11-11 Thread serue
Here is a resend of the LSM c/r patchset. The SELinux set could stand a few acks, but since our c/r tree is somewhat behind upstream, I'll wait until we forward-port to resend to the selinux list and seek those ACKS. Can we get the rest of the patches applied now? All tests pass with this set on

[Devel] [PATCH 1/7] move handling of err down into _ckpt_do_msg and _append

2009-11-05 Thread serue
From: Serge E. Hallyn Since ckpt_err() will also be used at restart, and since at restart we don't want to just set ctx->err, move handling of the argument 'err' further down. We only set ckpt->errno if err is not 0 and a checkpoint is going on. Then we automatically add '[err %d] % err' if err

[Devel] [PATCH 7/7] (debug) print vpids for all restarting tasks

2009-11-05 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/restart.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/checkpoint/restart.c b/checkpoint/restart.c index 9e2647e..724b7b2 100644 --- a/checkpoint/restart.c +++ b/checkpoint/restart.c @@ -158,7 +158,

[Devel] [PATCH 4/7] files.c: ckpt_err() during restore

2009-11-05 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/files.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/checkpoint/files.c b/checkpoint/files.c index 14ccfd6..9686b0b 100644 --- a/checkpoint/files.c +++ b/checkpoint/files.c @@ -649,6 +649,9 @@

[Devel] [PATCH 6/7] have ckpt_err set ctx->errno

2009-11-05 Thread serue
From: Serge E. Hallyn Move setting of ctx->errno into do_ckpt_msg(). We leave a small separate function to notify all restarting tasks in case of failure. We use a CKPT_CTX_WOKEN bit for this. If we always notify restarting tasks of failure inside do_ckpt_msg() then we will have to be more car

[Devel] [PATCH 2/7] restart.c: use ckpt_err

2009-11-05 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn Changelog: Nove 4: update restart.c ckpt_err usage Signed-off-by: Serge E. Hallyn --- checkpoint/restart.c | 81 +++--- 1 files changed, 57 insertions(+), 24 deletions(-) diff --git a/

[Devel] [PATCH 5/7] kernel/cred.c: ckpt_err at restart

2009-11-05 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- kernel/cred.c | 46 -- 1 files changed, 36 insertions(+), 10 deletions(-) diff --git a/kernel/cred.c b/kernel/cred.c index 62d28a4..c941078 100644 --- a/kernel/cred.c +++ b/kernel/cred.c @@ -

[Devel] [PATCH 0/7] Expand usage of ckpt_err

2009-11-05 Thread serue
From: Serge E. Hallyn This patchset expands the usage of ckpt_err(). It moves the setting of ckpt_err (and CKPT_CTX_ERROR kflag) into ckpt_err() itself. It puts cktp_err()s in useful places for restart, and in some cases improves the information in the messages. It also splits the old 'restore

[Devel] [PATCH 3/7] process.c: use ckpt_err at restart

2009-11-05 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/process.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/checkpoint/process.c b/checkpoint/process.c index 5bc8ccc..9a56f68 100644 --- a/checkpoint/process.c +++ b/checkpoint/process.c @

[Devel] [PATCH 00/12] Standardize c/r error reporting (v3)

2009-11-02 Thread serue
From: Serge E. Hallyn Here is a completely new approach, basically verbatim implementing Oren's recipe from last Friday. It only implements the error part to replace ckpt_write_err. The intent would be for ckpt_debug to also be replaced by ckpt_msg() which would be similar to ckpt_err() except

[Devel] [PATCH 07/12] checkpoint/signal.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/signal.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/checkpoint/signal.c b/checkpoint/signal.c index cdfb142..f34dbf4 100644 --- a/checkpoint/signal.c +++ b/checkpoint/signal.c @@ -287,7 +287

[Devel] [PATCH 03/12] checkpoint/files.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/files.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/checkpoint/files.c b/checkpoint/files.c index 440b7a9..99aedda 100644 --- a/checkpoint/files.c +++ b/checkpoint/files.c @@ -88,7 +8

[Devel] [PATCH 11/12] remove ckpt_write_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/checkpoint.c| 178 include/linux/checkpoint.h | 11 --- 2 files changed, 0 insertions(+), 189 deletions(-) diff --git a/checkpoint/checkpoint.c b/checkpoint/checkpoint.c inde

[Devel] [PATCH 02/12] switch ckpt_write_err callers to ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- arch/x86/mm/checkpoint.c |4 ++-- checkpoint/checkpoint.c | 39 ++- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/arch/x86/mm/checkpoint.c b/arch/x86/mm/checkpoint.c index 32d9

[Devel] [PATCH 01/12] define a new set of functions for error and debug logging

2009-11-02 Thread serue
From: Serge E. Hallyn The checkpoint context now includes buffers for an expanded format and for messages to be written out. A mutex protects these buffers as they are being built up and written out. ckpt_msg() will write general informative (debug) messages to syslog and an optional user-provid

[Devel] [PATCH 06/12] checkpoint/process.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/process.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/checkpoint/process.c b/checkpoint/process.c index 8e4a823..2c65e77 100644 --- a/checkpoint/process.c +++ b/checkpoint/process.c @@ -256,2

[Devel] [PATCH 10/12] net/{, unix}/checkpoint.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- net/checkpoint.c | 10 +- net/unix/checkpoint.c |5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/net/checkpoint.c b/net/checkpoint.c index dd23efd..19025cc 100644 --- a/net/checkpoint.c +++ b/net

[Devel] [PATCH 05/12] checkpoint/objhash.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/objhash.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/checkpoint/objhash.c b/checkpoint/objhash.c index 730dd82..5d72d04 100644 --- a/checkpoint/objhash.c +++ b/checkpoint/objhash.c @@ -657,7

[Devel] [PATCH 08/12] drivers/char/tty_io.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- drivers/char/tty_io.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 1b220c1..5a853a3 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.

[Devel] [PATCH 12/12] add logfd to c/r api

2009-11-02 Thread serue
From: Serge E. Hallyn and write msgs to user-provided logfile if one exists. Signed-off-by: Serge E. Hallyn --- checkpoint/objhash.c |2 ++ checkpoint/sys.c | 25 ++--- include/linux/checkpoint_types.h |1 + include/linux/syscalls.h

[Devel] [PATCH 04/12] checkpoint/memory.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/memory.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/checkpoint/memory.c b/checkpoint/memory.c index 656614c..6cfd079 100644 --- a/checkpoint/memory.c +++ b/checkpoint/memory.c @@ -679,8 +6

[Devel] [PATCH 09/12] fs/eventpoll.c ckpt_write_err->ckpt_err

2009-11-02 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- fs/eventpoll.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index e07de97..3e177ef 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1549,7 +1549,7 @@ unlock: if (num

[Devel] [PATCH 01/22] Make __ckpt_generate_fmt public

2009-10-30 Thread serue
From: Serge E. Hallyn Move it to checkpoint/sys.c, call it ckpt_generate_fmt, make it non-static. It will be used later by ckpt_error, which is used during restart as well as checkpoint. Signed-off-by: Serge E. Hallyn --- checkpoint/checkpoint.c| 90 +

[Devel] [PATCH 15/22] explain locking for write_err_msg

2009-10-30 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/checkpoint.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/checkpoint/checkpoint.c b/checkpoint/checkpoint.c index 71340de..f057c7a 100644 --- a/checkpoint/checkpoint.c +++ b/chec

[Devel] [PATCH 14/22] define ckpt_error and implement ckpt_do_write_msg

2009-10-30 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/sys.c | 64 include/linux/checkpoint.h |6 +++- 2 files changed, 69 insertions(+), 1 deletions(-) diff --git a/checkpoint/sys.c b/checkpoint/sys.c index b959b27..94c

[Devel] [PATCH 03/22] switch ckpt_generate_err to use ctx fields

2009-10-30 Thread serue
From: Serge E. Hallyn ckpt_generate_fmt() now places the format in ctx->fmt_buf. ckpt_fill_err_string() calls ckpt_generate_fmt() under ctx->fmt_buf_lock, and writes its own error (under ctx->err_string_lock) to ctx->err_string. Signed-off-by: Serge E. Hallyn --- checkpoint/checkpoint.c|

[Devel] [PATCH 02/22] Add format and message buffers to ctx and make err_str bigger

2009-10-30 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/sys.c |5 + include/linux/checkpoint_types.h | 18 +- 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/checkpoint/sys.c b/checkpoint/sys.c index c888a12..0a486f0 100644 -

[Devel] [PATCH 04/22] Change to the new enhanced error string format

2009-10-30 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/checkpoint.c| 15 ++ checkpoint/sys.c | 122 ++-- include/linux/checkpoint.h | 12 ++-- 3 files changed, 72 insertions(+), 77 deletions(-) diff --git a/checkpoint/

[Devel] [PATCH 13/22] add logfd to c/r api

2009-10-30 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/objhash.c |2 ++ checkpoint/sys.c | 22 +- include/linux/checkpoint_types.h |1 + include/linux/syscalls.h |5 +++-- 4 files changed, 23 insertions(+), 7 del

[Devel] [PATCH 00/22] Standardize c/r error reporting (v2)

2009-10-30 Thread serue
From: Serge E. Hallyn This patchset does the following: 1. defines ckpt_error() 2. allows users to pass a logfd into sys_checkpoint and sys_restart 3. Switches ckpt_write_err() to accepting a single enhanced format string, instead of two separate form

[Devel] [PATCH 17/17] ckpt_error in ipc/checkpoint_shm.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- ipc/checkpoint_shm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ipc/checkpoint_shm.c b/ipc/checkpoint_shm.c index 826e430..eb9dc50 100644 --- a/ipc/checkpoint_shm.c +++ b/ipc/checkpoint_shm.c @@ -266,7 +266,

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

2009-10-29 Thread serue
From: Serge E. Hallyn In cases where f(x) always returns 0 or <0, I felt free to remove 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 de

[Devel] [PATCH 14/17] ckpt_error in checkpoint/process.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/process.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/checkpoint/process.c b/checkpoint/process.c index e84683f..9f46769 100644 --- a/checkpoint/process.c +++ b/checkpoint/process.c @@ -581

[Devel] [PATCH 15/17] ckpt_error in ipc/checkpoint_msg.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- ipc/checkpoint_msg.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ipc/checkpoint_msg.c b/ipc/checkpoint_msg.c index b933c19..806fe74 100644 --- a/ipc/checkpoint_msg.c +++ b/ipc/checkpoint_msg.c @@ -352,7 +352,

[Devel] [PATCH 05/17] ckpt_write_err update checkpoint/memory.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/memory.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/checkpoint/memory.c b/checkpoint/memory.c index 656614c..c94a85e 100644 --- a/checkpoint/memory.c +++ b/checkpoint/memory.c @@ -679,7 +679

[Devel] [PATCH 01/17] ckpt_write_err: use single format with %(T) style tokens

2009-10-29 Thread serue
From: Serge E. Hallyn Matt Helsley originally suggested this to avoid having two format strings. This is not bisect-safe and therefore not even compile-tested. Every call to ckpt_write_err must be updated to use a single format. Changelog: Oct 29: merge with the next patch, moving ckpt

[Devel] [PATCH 03/17] ckpt_write_err update checkpoint/checkpoint.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/checkpoint.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/checkpoint/checkpoint.c b/checkpoint/checkpoint.c index c6be4f9..35fce15 100644 --- a/checkpoint/checkpoint.c ++

[Devel] [PATCH 10/17] define function to print error messages to user log

2009-10-29 Thread serue
From: Serge E. Hallyn Error messages are both sent to an optional user-provided logfile, and, if CONFIG_CHECKPOINT_DEBUG=y, sent to syslog. Changelog: Oct 29: Split ckpt_log_error() into ckpt_log_error_v() and have ckpt_write_err() call it to duplicate the checkpoint

[Devel] [PATCH 11/17] have restore_debug_free use ckpt_error

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/restart.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/checkpoint/restart.c b/checkpoint/restart.c index 9b75de8..3f23397 100644 --- a/checkpoint/restart.c +++ b/checkpoint/restart.c @@ -1

[Devel] [PATCH 09/17] ckpt_write_err update fs/eventpoll.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- fs/eventpoll.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index e07de97..f21745b 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1549,7 +1549,7 @@ unlock: if (num

[Devel] [PATCH 07/17] ckpt_write_err update checkpoint/process.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/process.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/checkpoint/process.c b/checkpoint/process.c index 8e4a823..e84683f 100644 --- a/checkpoint/process.c +++ b/checkpoint/process.c @@ -256,2

[Devel] [PATCH 06/17] ckpt_write_err update checkpoint/objhash.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/objhash.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/checkpoint/objhash.c b/checkpoint/objhash.c index 730dd82..a152e69 100644 --- a/checkpoint/objhash.c +++ b/checkpoint/objhash.c @@ -657,7

[Devel] [PATCH 16/17] ckpt_error in ipc/checkpoint_sem.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- ipc/checkpoint_sem.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ipc/checkpoint_sem.c b/ipc/checkpoint_sem.c index 76eb2b9..0b610ee 100644 --- a/ipc/checkpoint_sem.c +++ b/ipc/checkpoint_sem.c @@ -209,7 +209,

[Devel] [PATCH 13/17] ckpt_error in checkpoint/files.c

2009-10-29 Thread serue
From: Serge E. Hallyn Convert two ckpt_debugs to ckpt_errors - however, given that they are merely doubling information available in ckpt_write_err(), should they simply be removed? Signed-off-by: Serge E. Hallyn --- checkpoint/files.c |6 -- 1 files changed, 4 insertions(+), 2 deletio

[Devel] [PATCH 00/17] Standardize c/r error reporting

2009-10-29 Thread serue
From: Serge E. Hallyn This patchset 1. defines ckpt_error() 2. allows users to pass a logfd into sys_checkpoint and sys_restart 3. Switches ckpt_write_err() to accepting a single enhanced format string, instead of two separate formats. 4. Has

[Devel] [PATCH 08/17] ckpt_write_err update checkpoint/signal.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/signal.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/checkpoint/signal.c b/checkpoint/signal.c index cdfb142..3eed685 100644 --- a/checkpoint/signal.c +++ b/checkpoint/signal.c @@ -287,7 +28

[Devel] [PATCH 02/17] ckpt_write_err update arch/x86/mm/checkpoint.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- arch/x86/mm/checkpoint.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/checkpoint.c b/arch/x86/mm/checkpoint.c index 9dd8e12..3b0f514 100644 --- a/arch/x86/mm/checkpoint.c +++ b/arch/x86/mm/checkp

[Devel] [PATCH 04/17] ckpt_write_err update checkpoint/files.c

2009-10-29 Thread serue
From: Serge E. Hallyn Signed-off-by: Serge E. Hallyn --- checkpoint/files.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/checkpoint/files.c b/checkpoint/files.c index 440b7a9..1f2ab07 100644 --- a/checkpoint/files.c +++ b/checkpoint/files.c @@ -88,7 +