All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: Joshua Brindle <method@manicmethod.com>
Cc: Daniel J Walsh <dwalsh@redhat.com>,
	SE Linux <selinux@tycho.nsa.gov>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: This policy causes checkmodule to segfault.
Date: Mon, 17 Nov 2008 15:42:29 +0900	[thread overview]
Message-ID: <49211255.4030105@ak.jp.nec.com> (raw)
In-Reply-To: <4920B3C1.4000405@manicmethod.com>

Joshua Brindle wrote:
> Daniel J Walsh wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> policy_module(test, 1.0)
>>
>> gen_require(`
>>   type a_t;
>> ')
>> type b_t alias a_t;
>>   
> 
> Well, this doesn't look good. There are a couple issues here. The first 
> is that when we changed the symtab_insert behavior to allow require then 
> declare we missed the alias case, the patch below should fix that. The 
> second problem is that type_write now treats primary as a boolean value 
> (as of the typebounds patch). A while back we made primary not 
> necessarily a boolean in the module case where an alias had a value 
> already and we needed to keep track of what the primary value was. The 
> typebounds patch combined multiple fields into a 'properties' bitmap, 
> which includes primary, so the value is now lost.
> 
> We can change the module format to keep the primary field around, this 
> particular piece of code is getting increasingly more confusing though 
> (write.c:970)

Because the total number of types/aliases are (2^16-1) in maximum, we can
put the primary field into the property field (32bit width) on-disk format.
However, it seems to me an ad-hoc hack. It is a more straight forward solution
to separate cases between modular policy and kernel policy.

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

      reply	other threads:[~2008-11-17  6:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-14 20:56 This policy causes checkmodule to segfault Daniel J Walsh
2008-11-16 23:58 ` Joshua Brindle
2008-11-17  6:42   ` KaiGai Kohei [this message]

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=49211255.4030105@ak.jp.nec.com \
    --to=kaigai@ak.jp.nec.com \
    --cc=dwalsh@redhat.com \
    --cc=method@manicmethod.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /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.