From: Joshua Brindle <method@manicmethod.com>
To: Joshua Brindle <method@manicmethod.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
Karl MacMillan <kmacmillan@mentalrootkit.com>,
SELinux List <selinux@tycho.nsa.gov>,
Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: [PATCH] map booleans during expansion
Date: Fri, 30 Mar 2007 08:15:48 -0400 [thread overview]
Message-ID: <460CFF74.2010503@manicmethod.com> (raw)
In-Reply-To: <460BC8C4.6070107@manicmethod.com>
Joshua Brindle wrote:
> Stephen Smalley wrote:
>> On Thu, 2007-03-29 at 08:38 -0400, Joshua Brindle wrote:
>>
>>> Karl MacMillan wrote:
>>>
>>>> [below is a response to an accidentally off-list discussion]
>>>>
>>>> On Wed, 2007-03-28 at 12:29 -0400, Stephen Smalley wrote:
>>>>
>>>>> On Wed, 2007-03-28 at 12:16 -0400, Karl MacMillan wrote:
>>>>>
>>>>>> Currently, the expander does not map booleans during expansion.
>>>>>>
>>>> However,
>>>>
>>>>>> it is possible that booleans can be declared in an optional block
>>>>>> resulting in the need to map the booleans. This patch adds boolean
>>>>>> mappings to the expander. The same thing likely needs to be done for
>>>>>> roles and users - Josh, can you confirm
>>>>>>
>>> This is correct, only types are being remapped by the expander. I
>>> guess someone didn't think all the extra code to remap all of them
>>> was worth it since they are very small namespaces anyway.
>>>
>>
>> So do they need to be remapped or not?
>>
>>
> It isn't strictly necessary. Holes in the symbol tables aren't
> currently causing any problems and the new representation shouldn't
> have this problem so I don't know the value in applying this patch now.
>
Ok, I was wrong, since we test that value < hashtab.nprim holes do
indeed cause indexing errors (the elusive "error indexing out symbols"
error). We should apply this to trunk and stable (the fixed version
without the leak)
>> BTW, valgrind shows that the patched code is leaking memory, e.g.
>> ==5249== 30,576 bytes in 546 blocks are definitely lost in loss
>> record 8 of 9
>> ==5249== at 0x4005400: malloc (vg_replace_malloc.c:149)
>> ==5249== by 0x80570CF: cond_node_create (in
>> /home/sds/obj/usr/bin/checkpolicy)
>> ==5249== by 0x80607EF: cond_node_copy (in
>> /home/sds/obj/usr/bin/checkpolicy)
>> ==5249== by 0x80623E6: copy_and_expand_avrule_block (in
>> /home/sds/obj/usr/bin/checkpolicy)
>> ==5249== by 0x8062B9B: expand_module (in
>> /home/sds/obj/usr/bin/checkpolicy)
>> ==5249== by 0x804A262: main (checkpolicy.c:538)
>>
--
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.
prev parent reply other threads:[~2007-03-30 12:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-28 16:16 [PATCH] map booleans during expansion Karl MacMillan
2007-03-28 20:43 ` Karl MacMillan
2007-03-29 12:38 ` Joshua Brindle
2007-03-29 13:42 ` Stephen Smalley
2007-03-29 13:49 ` Stephen Smalley
2007-03-29 14:10 ` Joshua Brindle
2007-03-29 15:22 ` Karl MacMillan
2007-03-30 12:23 ` Joshua Brindle
2007-03-30 12:15 ` Joshua Brindle [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=460CFF74.2010503@manicmethod.com \
--to=method@manicmethod.com \
--cc=dwalsh@redhat.com \
--cc=kmacmillan@mentalrootkit.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.