Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Oren Laadan <orenl@librato.com>
Cc: Oren Laadan <orenl@cs.columbia.edu>,
	Linux Containers <containers@lists.osdl.org>,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH 2/4] cr: add generic LSM c/r support (v5)
Date: Fri, 16 Oct 2009 12:41:55 -0500	[thread overview]
Message-ID: <20091016174155.GB10197@us.ibm.com> (raw)
In-Reply-To: <4AD8A76A.8030201@librato.com>

Quoting Oren Laadan (orenl@librato.com):
> > 4. Add a new field to the struct ckpt_obj which lets us store
> > the objref for the string pointer in the ckpt_obj for the void*.
> 
> Can you elaborate on what this entails ?
> 
> E.g., do you want to be able to store an arbitrary data field for
> an object, and add interface to set and get it ?  (If so, what is
> the proposed api ?)

Well we could do it either way - just make it a typeless field
that anyone coudl use as a sideband, or make it a signed int
only meant to be a link to another objref.

Don't much care about the API, but one way it could be used in
checkpoint_security() would be:

	objref = ckpt_obj_lookup_add(ctx, security, CKPT_OBJ_VOIDSEC, &new);
	if (!new)
		return ckpt_obj_getlink(ctx, objref);

	/* ... get the string context from the lsm and construct
	 * the struct ckpt_lsm_string */
	construct_lsm_string(ctx, &l, security, CKPT_SECTYPE_FILE);
	linkref = checkpoint_obj(ctx, l, CKPT_OBJ_SEC);
	ckpt_obj_setlink(ctx, objref, linkref);
	return linkref;

But really, the only point of doing this is so that we can use
checkpoint_obj() instead of doing

	h = ckpt_hdr_get_type(ctx, sizeof(*h), CKPT_HDR_SEC);
	ckpt_write_obj(ctx, &h->h);
	ckpt_hdr_put(ctx, h);
	ckpt_write_string(ctx, context_string, strlen(context_string)+1);

-serge


  reply	other threads:[~2009-10-16 17:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 20:55 [PATCH 1/4] debug: add a few ckpt_debugs Serge E. Hallyn
     [not found] ` <20091009205552.GA5778-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-09 20:56   ` [PATCH 2/4] cr: add generic LSM c/r support (v5) Serge E. Hallyn
     [not found]     ` <20091009205626.GA5823-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-15 14:57       ` Oren Laadan
2009-10-15 17:06         ` Serge E. Hallyn
2009-10-16 17:03           ` Oren Laadan
2009-10-16 17:41             ` Serge E. Hallyn [this message]
2009-10-09 20:56   ` [PATCH 3/4] cr: add smack support to lsm c/r (v4) Serge E. Hallyn
2009-10-09 20:57   ` [PATCH 4/4] cr: add selinux support (v6) Serge E. Hallyn
     [not found]     ` <20091009205731.GC5823-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-09 21:15       ` Daniel J Walsh
     [not found]         ` <4ACFA7F1.6060209-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-10-09 22:31           ` Serge E. Hallyn
2009-10-14 22:41   ` [PATCH 1/4] debug: add a few ckpt_debugs 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=20091016174155.GB10197@us.ibm.com \
    --to=serue@us.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=orenl@cs.columbia.edu \
    --cc=orenl@librato.com \
    /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