All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: casey@schaufler-ca.com
Cc: selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org
Subject: Re: [RFC PATCH v6 05/13] SELinux: add secctx_to_secid() LSM hook
Date: Fri, 9 Nov 2007 20:21:03 -0500	[thread overview]
Message-ID: <200711092021.03362.paul.moore@hp.com> (raw)
In-Reply-To: <199039.66000.qm@web36614.mail.mud.yahoo.com>

On Friday 09 November 2007 5:19:02 pm Casey Schaufler wrote:
> --- Paul Moore <paul.moore@hp.com> wrote:
> > Add a secctx_to_secid() LSM hook to go along with the existing
> > secid_to_secctx() LSM hook.
>
> I'll bite. Where does this get used?

Patch 12/13, functions netlbl_unlabel_staticadd() and 
netlbl_unlabel_staticadddef().  It is used to convert a user supplied label 
into a token which is later passed to the LSM; in the SELinux case it is used 
directly in an avc_has_perm() call.

Go ahead and check, I'll wait ... just please don't bring up the whole 
getpeercon() issue (essentially the example you chose, although you picked 
the connectionless version) again.  Worrying about something that typically 
happens only once (if at all) per-connection is not something I want to worry 
about optimizing if it causes the per-packet case to become more tedious.

> There. I got the righteous indignation off my chest. I say to
> go ahead with adding this to the LSM ... {snip}

Sigh.  I agree, the whole tokenized label concept is conceptually very 
annoying and I'll also agree that it can be frustrating for certain 
implementations.  However, the world we live in (the Linux kernel) makes use 
of these tokenized labels (secid, SID, etc) because it's all the original LSM 
folks could get in some places.  The fact that this works fine with SELinux 
(actually works better than fine in some cases) is a happy coincidence and 
probably the reason things haven't changed much.

I _really_ don't want to get into the "one true security model" debate, but 
the fact remains that as long as SELinux is the only LSM implementation in 
the mainline kernel there is no reason to change this.  If/when SMACK (this 
is really the immediate source of the "righteous indignation" after all, 
right?) is merged then it will probably make sense to go revisit some of 
those earlier decisions regarding these tokenized labels.  For me personally, 
right now I'm just concerned about making sure the labeled networking bits 
work as well as we can make them work; with SELinux that means using a 
secid/SID to speed up the per-packet access checks.  For SMACK, this will 
probably mean passing the actual string label.  You and I have already talked 
about this so _you_know_ there is a SMACK friendly solution to the 
fallback/static label functionality; I just can't justify adding code that 
serves no purpose in the context (haha!) of the current kernel sources.

You know all this Casey, so I have no idea where all of these comments are 
coming from - bad day at work?  Somebody run over your dog?  Well, go home, 
have a beer and forget about it for right now.  Get SMACK merged, or any 
other LSM which highlights the same problem, and we can put that "righteous 
indignation" to good use; right now, it's just plan tiresome.

> In Linux 2.7 I propose that we fix these problems. Not today.

Un huh ... in the meantime I'm gonna work with what I have :)

-- 
paul moore
linux security @ hp

--
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-11-10  1:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 21:23 [RFC PATCH v6 00/13] Labeled networking patches Paul Moore
2007-11-09 21:23 ` [RFC PATCH v6 01/13] NetLabel: remove unneeded RCU read locks Paul Moore
2007-11-09 21:23 ` [RFC PATCH v6 02/13] NetLabel: cleanup the LSM domain hash functions Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 03/13] NetLabel: consolidate the LSM domain mapping/hashing locks Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 04/13] NetLabel: Add secid token support to the NetLabel secattr struct Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 05/13] SELinux: add secctx_to_secid() LSM hook Paul Moore
2007-11-09 22:19   ` Casey Schaufler
2007-11-10  1:21     ` Paul Moore [this message]
2007-11-11  6:27       ` Casey Schaufler
2007-11-09 21:24 ` [RFC PATCH v6 06/13] NetLabel: add IP address family information to the netlbl_skbuff_getattr() function Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 07/13] SELinux: Add a capabilities bitmap to SELinux policy version 22 Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 08/13] SELinux: Add new peer permissions to the Flask definitions Paul Moore
2007-11-11 22:31   ` James Morris
2007-11-12 16:34     ` Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 09/13] SELinux: Better integration between peer labeling subsystems Paul Moore
2007-11-11 22:34   ` James Morris
2007-11-12 16:40     ` Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 10/13] SELinux: Enable dynamic enable/disable of the network access checks Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 11/13] SELinux: allow NetLabel to directly cache SIDs Paul Moore
2007-11-09 21:24 ` [RFC PATCH v6 12/13] NetLabel: introduce static network labels for unlabeled connections Paul Moore
2007-11-09 21:25 ` [RFC PATCH v6 13/13] NetLabel: add auditing to the static labeling mechanism Paul Moore

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=200711092021.03362.paul.moore@hp.com \
    --to=paul.moore@hp.com \
    --cc=casey@schaufler-ca.com \
    --cc=linux-security-module@vger.kernel.org \
    --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.