All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <method@manicmethod.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov, James Morris <jmorris@namei.org>,
	Eric Paris <eparis@parisplace.org>,
	Karl MacMillan <kmacmillan@mentalrootkit.com>
Subject: Re: [PATCH][RFC] selinux: preserve boolean values across	policy	reloads
Date: Thu, 19 Apr 2007 14:45:26 -0400	[thread overview]
Message-ID: <4627B8C6.7070902@manicmethod.com> (raw)
In-Reply-To: <1177008135.27654.198.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Thu, 2007-04-19 at 14:33 -0400, Joshua Brindle wrote:
>   
>> Stephen Smalley wrote:
>>     
>>> On Thu, 2007-04-19 at 14:21 -0400, Joshua Brindle wrote:
>>>   
>>>       
>>>> Stephen Smalley wrote:
>>>>     
>>>>         
>>>>> At present, the userland policy loading code has to go through contortions to preserve
>>>>> boolean values across policy reloads, and cannot do so atomically.  
>>>>> As this is what we always want to do for reloads, let the kernel preserve them instead.
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> Are there situation where you may want to reset the boolean state to 
>>>> policy defaults? I can't think of realistic scenarios but if one ever 
>>>> comes up do we want to provide that facility?
>>>>     
>>>>         
>>> You can always set them after the load if you want to force them back to
>>> those defaults.  But I don't think anything is presently using
>>> load_policy -b.
>>>
>>> Alternative model is to make it a policy config flag (which I also
>>> played with), but then you don't gain anything in libselinux wrt
>>> removing/reducing the libsepol dependency - you still need sepol
>>> interfaces to set/clear that flag.
>>>   
>>>       
>> Thats what I was thinking. We could always have an selinuxfs node but 
>> that is racy. It seems like we need some sort of options struct we can 
>> send the kernel that is generated at load time and sent before the 
>> policy so thats its atomic. Would anything else use this? compat_net for 
>> example?
>>     
>
> It seems like a lot of complication just to allow for a rare (and
> presently unknown) case.  Policy config flags are easy enough to define
> and we still have plenty of space for them in the existing header, but
> then you have to resolve initial setting, preservation, and allowed
> forms of mutation, and as I said, you'd still be requiring libselinux to
> call libsepol to map to a policydb, mutate the flag, and map it back to
> a policy image at load time, so you don't gain a whole lot over the
> current genbools call (except for the atomicity of the preservation).
>   
Well, thats why i suggested an options struct that is independant from 
the policydb. But since we have no known users its fine, I just wonder 
if we'll need something like this in the future (and we already know 
that we have issues with eg., compat_net being set after the policy that 
needs it is loaded)

--
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:[~2007-04-19 18:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-19 18:16 [PATCH][RFC] selinux: preserve boolean values across policy reloads Stephen Smalley
2007-04-19 18:21 ` Joshua Brindle
2007-04-19 18:31   ` Stephen Smalley
2007-04-19 18:33     ` Joshua Brindle
2007-04-19 18:42       ` Stephen Smalley
2007-04-19 18:45         ` Joshua Brindle [this message]
2007-04-19 18:54           ` Stephen Smalley
2007-04-19 18:34 ` Karl MacMillan
2007-04-20  0:26 ` James Morris

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=4627B8C6.7070902@manicmethod.com \
    --to=method@manicmethod.com \
    --cc=eparis@parisplace.org \
    --cc=jmorris@namei.org \
    --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.