lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080904160000.GB19364@us.ibm.com>
Date:	Thu, 4 Sep 2008 11:00:00 -0500
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Louis Rilling <Louis.Rilling@...labs.com>
Cc:	Oren Laadan <orenl@...columbia.edu>,
	containers@...ts.linux-foundation.org, jeremy@...p.org,
	linux-kernel@...r.kernel.org, arnd@...db.de,
	dave@...ux.vnet.ibm.com
Subject: Re: [RFC v3][PATCH 2/9] General infrastructure for checkpoint
	restart

Quoting Louis Rilling (Louis.Rilling@...labs.com):
> On Thu, Sep 04, 2008 at 04:02:38AM -0400, Oren Laadan wrote:
> >
> > Add those interfaces, as well as helpers needed to easily manage the
> > file format. The code is roughly broken out as follows:
> >
> > checkpoint/sys.c - user/kernel data transfer, as well as setup of the
> > checkpoint/restart context (a per-checkpoint data structure for
> > housekeeping)
> >
> > checkpoint/checkpoint.c - output wrappers and basic checkpoint handling
> >
> > checkpoint/restart.c - input wrappers and basic restart handling
> >
> > Patches to add the per-architecture support as well as the actual
> > work to do the memory checkpoint follow in subsequent patches.
> >
> 
> [...]
> 
> > diff --git a/include/linux/ckpt_hdr.h b/include/linux/ckpt_hdr.h
> > new file mode 100644
> > index 0000000..629ad5a
> > --- /dev/null
> > +++ b/include/linux/ckpt_hdr.h
> > @@ -0,0 +1,82 @@
> > +#ifndef _CHECKPOINT_CKPT_HDR_H_
> > +#define _CHECKPOINT_CKPT_HDR_H_
> > +/*
> > + *  Generic container checkpoint-restart
> > + *
> > + *  Copyright (C) 2008 Oren Laadan
> > + *
> > + *  This file is subject to the terms and conditions of the GNU General Public
> > + *  License.  See the file COPYING in the main directory of the Linux
> > + *  distribution for more details.
> > + */
> > +
> > +#include <linux/types.h>
> > +#include <linux/utsname.h>
> > +
> > +/*
> > + * To maintain compatibility between 32-bit and 64-bit architecture flavors,
> > + * keep data 64-bit aligned: use padding for structure members, and use
> > + * __attribute__ ((aligned (8))) for the entire structure.
> > + */
> > +
> > +/* records: generic header */
> > +
> > +struct cr_hdr {
> > +	__s16 type;
> > +	__s16 len;
> > +	__u32 parent;
> > +};
> > +
> > +/* header types */
> > +enum {
> > +	CR_HDR_HEAD = 1,
> > +	CR_HDR_STRING,
> > +
> > +	CR_HDR_TASK = 101,
> > +	CR_HDR_THREAD,
> > +	CR_HDR_CPU,
> > +
> > +	CR_HDR_MM = 201,
> > +	CR_HDR_VMA,
> > +	CR_HDR_MM_CONTEXT,
> > +
> > +	CR_HDR_TAIL = 5001
> > +};
> > +
> > +struct cr_hdr_head {
> > +	__u64 magic;
> > +
> > +	__u16 major;
> > +	__u16 minor;
> > +	__u16 patch;
> > +	__u16 rev;
> > +
> > +	__u64 time;	/* when checkpoint taken */
> > +	__u64 flags;	/* checkpoint options */
> > +
> > +	char release[__NEW_UTS_LEN];
> > +	char version[__NEW_UTS_LEN];
> > +	char machine[__NEW_UTS_LEN];
> > +} __attribute__((aligned(8)));
> > +
> > +struct cr_hdr_tail {
> > +	__u64 magic;
> > +} __attribute__((aligned(8)));
> > +
> > +struct cr_hdr_task {
> > +	__u64 state;
> > +	__u32 exit_state;
> > +	__u32 exit_code, exit_signal;
> 
> 64bits alignment issue?
> I probably missed it in previous versions...

In the first version it was followed by two __u16's (pid and tgid)...

-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ