netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul.moore@hp.com>
To: Venkat Yekkirala <vyekkirala@TrustedCS.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	netdev@vger.kernel.org, selinux@tycho.nsa.gov, jmorris@namei.org,
	eparis@redhat.com
Subject: Re: [PATCH 7/9] secid reconciliation-v04: Enforcement for SELinux
Date: Mon, 02 Oct 2006 13:29:48 -0400	[thread overview]
Message-ID: <45214C8C.2090306@hp.com> (raw)
In-Reply-To: <36282A1733C57546BE392885C0618592015CF4E4@chaos.tcs.tcs-sec.com>

Venkat Yekkirala wrote:
>>My immediate concern is not really what selinux_xfrm_decode_session()
>>returns, but how to handle it, or rather errors in general, in
>>selinux_skb_flow_in().  I'm in the process of creating a patch to add
>>the missing NetLabel support to the secid patches and I am 
>>wondering if
>>I should BUG_ON() for an error condition or simply jump to "out".
>>Jumping seems a bit cleaner to me, although perhaps harder to 
>>debug, so
>>I was just wondering what the reasoning was behind the use of 
>>BUG_ON().
> 
> 
> It's more a "code integrity" check that I have sought to enforce
> via BUG_ON (meaning the function isn't expected to fail under any
> circumstances). Whether this is a severe enough error (possible as
> a result of a bug in decode_session or a corrupted kernel) that we
> should panic the system at that point is probably debatable. In particular
> I would be interested to know how similar situations are currently
> treated in the kernel.
> 
> My recommendation would be to be consistent with the rest of the code
> and do a BUG_ON. 

That was how I was leaning and for the same reasons, I'll go that route
and if we need we can always change it later.

> As for other errors, you could jump out like the rest
> of the code already does (if that meets your needs that is).

-- 
paul moore
linux security @ hp

  reply	other threads:[~2006-10-02 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-02 17:25 [PATCH 7/9] secid reconciliation-v04: Enforcement for SELinux Venkat Yekkirala
2006-10-02 17:29 ` Paul Moore [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-01 21:27 Venkat Yekkirala
2006-10-02 16:12 ` Paul Moore
2006-10-02 16:35   ` Stephen Smalley
2006-10-02 16:43     ` James Morris
2006-10-02 16:58     ` 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=45214C8C.2090306@hp.com \
    --to=paul.moore@hp.com \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=netdev@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=vyekkirala@TrustedCS.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).