All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	selinux@vger.kernel.org,
	Linux-Audit Mailing List <linux-audit@redhat.com>
Subject: Re: [PATCH v3 3/4] selinux: remove some useless BUG_ONs
Date: Fri, 25 Jan 2019 17:36:00 -0500	[thread overview]
Message-ID: <CAHC9VhQB=WMiRF4BVKsz4GOAr+Szb=JYnJfFbgurQk7bEB8F8w@mail.gmail.com> (raw)
In-Reply-To: <CAFqZXNtuue8dQGigBR0SkiXbeohVxHhh5vdJxX7f=2p6C072gA@mail.gmail.com>

On Fri, Jan 25, 2019 at 11:15 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
>
> On Fri, Jan 25, 2019 at 2:49 PM Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > On 1/25/19 5:06 AM, Ondrej Mosnacek wrote:
> > > These BUG_ONs do not really protect from any catastrophic situation so
> > > there is no need to have them there.
> >
> > They are to catch bugs in callers that pass requested==0.  That is
> > always indicative of a bug in the caller (e.g. failed to correctly
> > compute the permissions).  Otherwise, we will silently allow such calls
> > and not notice them.
> >
> > At the least, they should be WARN_ONs.
>
> OK, seems that switching to WARN_ON() will be a better choice.
>
> Paul, you can apply the series without this patch and I will post a
> corrected patch separately (if that's OK with you).

Yep.  Patches 1, 2, and 4 should now be in selinux/next.

-- 
paul moore
www.paul-moore.com

WARNING: multiple messages have this Message-ID (diff)
From: Paul Moore <paul@paul-moore.com>
To: Ondrej Mosnacek <omosnace@redhat.com>
Cc: selinux@vger.kernel.org,
	Linux-Audit Mailing List <linux-audit@redhat.com>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [PATCH v3 3/4] selinux: remove some useless BUG_ONs
Date: Fri, 25 Jan 2019 17:36:00 -0500	[thread overview]
Message-ID: <CAHC9VhQB=WMiRF4BVKsz4GOAr+Szb=JYnJfFbgurQk7bEB8F8w@mail.gmail.com> (raw)
In-Reply-To: <CAFqZXNtuue8dQGigBR0SkiXbeohVxHhh5vdJxX7f=2p6C072gA@mail.gmail.com>

On Fri, Jan 25, 2019 at 11:15 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
>
> On Fri, Jan 25, 2019 at 2:49 PM Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > On 1/25/19 5:06 AM, Ondrej Mosnacek wrote:
> > > These BUG_ONs do not really protect from any catastrophic situation so
> > > there is no need to have them there.
> >
> > They are to catch bugs in callers that pass requested==0.  That is
> > always indicative of a bug in the caller (e.g. failed to correctly
> > compute the permissions).  Otherwise, we will silently allow such calls
> > and not notice them.
> >
> > At the least, they should be WARN_ONs.
>
> OK, seems that switching to WARN_ON() will be a better choice.
>
> Paul, you can apply the series without this patch and I will post a
> corrected patch separately (if that's OK with you).

Yep.  Patches 1, 2, and 4 should now be in selinux/next.

-- 
paul moore
www.paul-moore.com

  reply	other threads:[~2019-01-25 22:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 10:06 [PATCH v3 0/4] Report raw context in AVCs + refactoring Ondrej Mosnacek
2019-01-25 10:06 ` Ondrej Mosnacek
2019-01-25 10:06 ` [PATCH v3 1/4] selinux: inline some AVC functions used only once Ondrej Mosnacek
2019-01-25 10:06   ` Ondrej Mosnacek
2019-01-25 14:49   ` Stephen Smalley
2019-01-25 22:11   ` Paul Moore
2019-01-25 22:11     ` Paul Moore
2019-01-25 10:06 ` [PATCH v3 2/4] selinux: replace some BUG_ON()s with a WARN_ON() Ondrej Mosnacek
2019-01-25 10:06   ` Ondrej Mosnacek
2019-01-25 14:52   ` Stephen Smalley
2019-01-25 22:26   ` Paul Moore
2019-01-25 22:26     ` Paul Moore
2019-01-25 10:06 ` [PATCH v3 3/4] selinux: remove some useless BUG_ONs Ondrej Mosnacek
2019-01-25 10:06   ` Ondrej Mosnacek
2019-01-25 13:52   ` Stephen Smalley
2019-01-25 15:55     ` Ondrej Mosnacek
2019-01-25 15:55       ` Ondrej Mosnacek
2019-01-25 22:36       ` Paul Moore [this message]
2019-01-25 22:36         ` Paul Moore
2019-01-25 10:06 ` [PATCH v3 4/4] selinux: log invalid contexts in AVCs Ondrej Mosnacek
2019-01-25 10:06   ` Ondrej Mosnacek
2019-01-25 14:56   ` Stephen Smalley
2019-01-25 14:56     ` Stephen Smalley
2019-01-25 22:35   ` Paul Moore
2019-01-25 22:35     ` 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='CAHC9VhQB=WMiRF4BVKsz4GOAr+Szb=JYnJfFbgurQk7bEB8F8w@mail.gmail.com' \
    --to=paul@paul-moore.com \
    --cc=linux-audit@redhat.com \
    --cc=omosnace@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@vger.kernel.org \
    /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.