All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Dave Hansen
	<dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: Re: [RFC v14-rc2][PATCH 4/7] sysvipc-shm: restart
Date: Thu, 2 Apr 2009 20:42:58 -0700	[thread overview]
Message-ID: <20090403034258.GH4083@us.ibm.com> (raw)
In-Reply-To: <1238477552-17083-5-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>

On Tue, Mar 31, 2009 at 01:32:29AM -0400, Oren Laadan wrote:
> Like chekcpoint, restart of sysvipc shared memory is also performed in
> two steps: first, the entire ipc namespace is restored as a whole, by
> restoring each shm object read from the checkpoint image. The shmem's
> file pointer is registered in the objhash. Second, for each vma that
> refers to ipc shared memory, we use the objref to find the file in the
> objhash, and use that file in calling do_mmap_pgoff().
> 
> Handling of shm objects that have been deleted (via IPC_RMID) is left
> to a later patch in this series.
> 
> Handling of ipc shm mappings that are locked (via SHM_MLOCK) is also
> not restored at the moment.
> 
> Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
> ---
>  checkpoint/rstr_mem.c      |   23 ++++++
>  checkpoint/util_ipc.c      |    2 +-
>  include/linux/checkpoint.h |    3 +
>  ipc/ckpt_shm.c             |  167 +++++++++++++++++++++++++++++++++++++++++++-
>  4 files changed, 193 insertions(+), 2 deletions(-)

<snip>
 
> diff --git a/ipc/ckpt_shm.c b/ipc/ckpt_shm.c
> index 6a9382a..ee9b77a 100644
> --- a/ipc/ckpt_shm.c
> +++ b/ipc/ckpt_shm.c
> @@ -14,6 +14,7 @@
>  #include <linux/hugetlb.h>
>  #include <linux/rwsem.h>
>  #include <linux/sched.h>
> +#include <linux/file.h>
>  #include <linux/syscalls.h>
>  #include <linux/nsproxy.h>
>  #include <linux/ipc_namespace.h>
> @@ -45,7 +46,10 @@ static int cr_fill_ipc_shm_hdr(struct cr_ctx *ctx,
>  	hh->shm_cprid = shp->shm_cprid;
>  	hh->shm_lprid = shp->shm_lprid;
> 
> -	hh->mlock_uid = (shp->mlock_user ? shp->mlock_user->uid : UINT_MAX);
> +	if (shp->mlock_user)
> +		hh->mlock_uid = shp->mlock_user->uid;
> +	else
> +		hh->mlock_uid = (unsigned int) -1;

I think this hunk should be merged with the patch introducing the conditional
expression rather than appear in this patch.

Cheers,
	-Matt Helsley

  parent reply	other threads:[~2009-04-03  3:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31  5:32 [PATCH 00/07] sysv SHM checkpoint/restart Oren Laadan
     [not found] ` <1238477552-17083-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-03-31  5:32   ` [RFC v14-rc2][PATCH 1/7] ipc: allow allocation of an ipc object with desired identifier Oren Laadan
     [not found]     ` <1238477552-17083-2-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-02 17:22       ` Serge E. Hallyn
     [not found]         ` <20090402172233.GB9984-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-02 22:26           ` Oren Laadan
     [not found]             ` <49D53BB1.7000501-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-02 22:49               ` Serge E. Hallyn
2009-03-31  5:32   ` [RFC v14-rc2][PATCH 2/7] ipc: helpers to save and restore kern_ipc_perm structures Oren Laadan
2009-03-31  5:32   ` [RFC v14-rc2][PATCH 3/7] sysvipc-shm: checkpoint Oren Laadan
     [not found]     ` <1238477552-17083-4-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-03-31 20:06       ` Serge E. Hallyn
     [not found]         ` <20090331200658.GA19038-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-03-31 20:52           ` Oren Laadan
2009-03-31  5:32   ` [RFC v14-rc2][PATCH 4/7] sysvipc-shm: restart Oren Laadan
     [not found]     ` <1238477552-17083-5-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-03  3:42       ` Matt Helsley [this message]
2009-03-31  5:32   ` [RFC v14-rc2][PATCH 5/7] Infrastructure for work postponed to the end of checkpoint/restart Oren Laadan
     [not found]     ` <1238477552-17083-6-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-03-31 15:17       ` Dave Hansen
2009-03-31 16:00         ` Oren Laadan
2009-03-31  5:32   ` [RFC v14-rc2][PATCH 6/7] sysvipc-shm: export interface from ipc/shm.c to delete ipc shm Oren Laadan
     [not found]     ` <1238477552-17083-7-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-04-03  3:32       ` Matt Helsley
     [not found]         ` <20090403033200.GG4083-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-06  0:18           ` Oren Laadan
2009-03-31  5:32   ` [RFC v14-rc2][PATCH 7/7] sysvipc-shm: correctly handle deleted (active) ipc shared memory Oren Laadan

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=20090403034258.GH4083@us.ibm.com \
    --to=matthltc-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.