All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Ciao <qingtao.cao@windriver.com>
To: Joshua Brindle <method@manicmethod.com>
Cc: HarryCiao <harrytaurus2002@hotmail.com>, <cpebenito@tresys.com>,
	<dwalsh@redhat.com>, <slawrence@tresys.com>,
	<selinux@tycho.nsa.gov>
Subject: Re: [v0 PATCH 6/6] Skip tunable identifier and cond_node_t in expansion.
Date: Thu, 25 Aug 2011 18:38:40 +0800	[thread overview]
Message-ID: <4E562630.3040406@windriver.com> (raw)
In-Reply-To: <4E55CE04.4080305@manicmethod.com>

Joshua Brindle 写道:
> Harry Ciao wrote:
>> Hi Joshua,
>>
>> Joshua Brindle 写道:
>>> HarryCiao wrote:
>>> <snip>
>>>
>>>> The implementation of the save-linked option has no idea about the
>>>> effort to
>>>> separate tunables from booleans, so I am afraid it won't help much.
>>>>
>>>>
>>> I'm not sure about this. The linked policy should have everything
>>> that the
>>> original modules had, with only the value mapping changed. The
>>> expansion is
>>> where things get removed. This behavior should not change for a
>>> variety of
>>> reasons, including the ability to do a full semantic analysis of the
>>> linked policy.
>>>
>>>
>> I can't agree more that the linked module has everything but with the
>> identifiers' value remapped, actually the separate_tunables() is called
>> at the very end of link phase, which would do three operations:
>> 1. change the flags for some cond_bool_datum_t;
>> 2. change the flags for some cond_node_t;
>> 3. re-link the effective branch of a tunable conditional, to the end of
>> its home decl->avrules list;
>>
>> The 1st and 2nd operations won't stand in the way of any analysis, and
>> we could set the "handle-tunable = preserve" option in semanage.conf to
>> bypass the 3rd one.
>>
>
> We should defer the movement of effective rules to the main avrules
> list until expand, I hate adding even more side effects to link than
> already exist (it needs to just link, not move stuff around, not
> remove things, not change the effective policy, etc).
>
> You can do it as a first step to expand, it should entail just moving
> it from link.c to expand.c and adding it to the expand_module function.
>
Alright, I have moved it from the very end of link_modules() to the very
first of expand_module(). Would send the v1 patch along with
manipulating sepol handle.

Thanks,
Harry

--
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:[~2011-08-25 10:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 10:08 v0 Separate tunables from booleans Harry Ciao
2011-08-23 10:08 ` [v0 PATCH 1/6] Indicate when boolean is indeed a tunable Harry Ciao
2011-08-23 10:08 ` [v0 PATCH 2/6] Separate tunable from boolean during compile Harry Ciao
2011-08-23 10:08 ` [v0 PATCH 3/6] Write and read TUNABLE flags in related data structures Harry Ciao
2011-08-23 10:08 ` [v0 PATCH 4/6] Permanently enable the if or else branch of a tunable during link Harry Ciao
2011-08-23 10:08 ` [v0 PATCH 5/6] Copy and check the cond_bool_datum_t.flags " Harry Ciao
2011-08-23 10:08 ` [v0 PATCH 6/6] Skip tunable identifier and cond_node_t in expansion Harry Ciao
2011-08-23 13:43   ` Daniel J Walsh
2011-08-23 13:58     ` Christopher J. PeBenito
2011-08-24 10:32       ` HarryCiao
2011-08-24 12:11         ` Christopher J. PeBenito
2011-08-24 18:00         ` Joshua Brindle
2011-08-25 10:36           ` Harry Ciao
2011-08-24 18:02         ` Joshua Brindle
2011-08-25  3:22           ` Harry Ciao
2011-08-25  4:22             ` Joshua Brindle
2011-08-25 10:38               ` Harry Ciao [this message]
2011-08-24 17:54     ` Joshua Brindle
2011-08-24 20:24       ` Daniel J Walsh
2011-08-24 20:34         ` Joshua Brindle
2011-08-24 21:04           ` Daniel J Walsh
2011-08-24 16:02 ` v0 Separate tunables from booleans Eric Paris
2011-08-25  6:17   ` Harry Ciao
2011-08-25 13:04     ` Daniel J Walsh
2011-08-25 13:35       ` James Carter
2011-08-26 14:28         ` Daniel J Walsh
2011-08-26  1:17       ` Harry Ciao
2011-08-26  2:22         ` Eric Paris
2011-08-26 12:59           ` Daniel J Walsh
2011-08-26 13:06             ` Christopher J. PeBenito
2011-08-26 13:08               ` Christopher J. PeBenito
2011-08-26 14:11           ` Christopher J. PeBenito
2011-08-24 17:38 ` Christopher J. PeBenito
2011-08-24 17:52   ` Joshua Brindle
2011-08-25  5:31     ` Harry Ciao
2011-08-25 12:56       ` Joshua Brindle

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=4E562630.3040406@windriver.com \
    --to=qingtao.cao@windriver.com \
    --cc=cpebenito@tresys.com \
    --cc=dwalsh@redhat.com \
    --cc=harrytaurus2002@hotmail.com \
    --cc=method@manicmethod.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=slawrence@tresys.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 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.