mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Louis Rilling <Louis.Rilling@kerlabs.com>
To: Andrey Mirkin <major@openvz.org>
Cc: orenl@cs.columbia.edu, containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Add flags for user-space and in-kernel process creation
Date: Mon, 24 Nov 2008 17:02:11 +0100	[thread overview]
Message-ID: <20081124160211.GE27238@hawkmoon.kerlabs.com> (raw)
In-Reply-To: <1227541175-30301-2-git-send-email-major@openvz.org>

[-- Attachment #1: Type: text/plain, Size: 2285 bytes --]

On 24/11/08 18:39 +0300, Andrey Mirkin wrote:
> Introduce 2 flags for user-space and in-kernel process creation during
> restart procedure.
> Also a stub function for in-kernel process restart is introduced.
> 

[...]

> diff --git a/checkpoint/sys.c b/checkpoint/sys.c
> index 7745500..e4a9287 100644
> --- a/checkpoint/sys.c
> +++ b/checkpoint/sys.c
> @@ -264,8 +264,8 @@ asmlinkage long sys_restart(int crid, int fd, unsigned long flags)
>  	pid_t pid;
>  	int ret;
>  
> -	/* no flags for now */
> -	if (flags)
> +	if ((flags & (CR_CTX_RSTR_IN_USERSPACE | CR_CTX_RSTR_IN_USERSPACE)) ==
> +			(CR_CTX_RSTR_IN_USERSPACE | CR_CTX_RSTR_IN_USERSPACE))

I guess that the intent was:
+	if ((flags & (CR_CTX_RSTR_IN_USERSPACE | CR_CTX_RSTR_IN_KERNEL)) ==
+			(CR_CTX_RSTR_IN_USERSPACE | CR_CTX_RSTR_IN_KERNEL))

?

Louis

>  		return -EINVAL;
>  
>  	/* FIXME: for now, we use 'crid' as a pid */
> diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h
> index cab5e19..947469a 100644
> --- a/include/linux/checkpoint.h
> +++ b/include/linux/checkpoint.h
> @@ -61,6 +61,8 @@ struct cr_ctx {
>  /* cr_ctx: flags */
>  #define CR_CTX_CKPT	0x1
>  #define CR_CTX_RSTR	0x2
> +#define CR_CTX_RSTR_IN_USERSPACE	0x4
> +#define CR_CTX_RSTR_IN_KERNEL		0x8
>  
>  extern int cr_kwrite(struct cr_ctx *ctx, void *buf, int count);
>  extern int cr_kread(struct cr_ctx *ctx, void *buf, int count);
> @@ -108,6 +110,7 @@ extern int cr_write_mm(struct cr_ctx *ctx, struct task_struct *t);
>  extern int cr_write_files(struct cr_ctx *ctx, struct task_struct *t);
>  
>  extern int do_restart(struct cr_ctx *ctx, pid_t pid);
> +extern int do_restart_in_kernel(struct cr_ctx *ctx);
>  extern int cr_read_mm(struct cr_ctx *ctx);
>  extern int cr_read_files(struct cr_ctx *ctx);
>  
> -- 
> 1.5.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Dr Louis Rilling			Kerlabs
Skype: louis.rilling			Batiment Germanium
Phone: (+33|0) 6 80 89 08 23		80 avenue des Buttes de Coesmes
http://www.kerlabs.com/			35700 Rennes

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2008-11-24 16:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 15:39 [PATCH 0/2] In-kernel process restart Andrey Mirkin
2008-11-24 15:39 ` [PATCH 1/2] Add flags for user-space and in-kernel process creation Andrey Mirkin
2008-11-24 15:39   ` [PATCH 2/2] Add support for in-kernel process creation during restart Andrey Mirkin
2008-11-25  0:45     ` Alexey Dobriyan
2008-11-26  5:07       ` Andrey Mirkin
2008-11-25 20:17     ` Oren Laadan
2008-11-26 11:58       ` Andrey Mirkin
2008-11-24 16:02   ` Louis Rilling [this message]
2008-11-26  4:55     ` [PATCH 1/2] Add flags for user-space and in-kernel process creation Andrey Mirkin
2008-11-25 20:02 ` [PATCH 0/2] In-kernel process restart Oren Laadan
2008-11-26 11:44   ` Andrey Mirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081124160211.GE27238@hawkmoon.kerlabs.com \
    --to=louis.rilling@kerlabs.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=major@openvz.org \
    --cc=orenl@cs.columbia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®