selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Joshua Brindle <joshua.brindle@crunchydata.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, selinux@vger.kernel.org
Subject: Re: [PATCH v3] default_range glblub implementation
Date: Fri, 30 Aug 2019 17:44:35 -0400	[thread overview]
Message-ID: <CAHC9VhTqe5OFUSwCV-RDa8LEq0Kwv2XE3hZVX078fH42y3Uubw@mail.gmail.com> (raw)
In-Reply-To: <CAGB+Vh6tLsLEd7fwQqkqFjgf0YZznFm=DUAMe39oFMBf8+eDXw@mail.gmail.com>

On Fri, Aug 30, 2019 at 11:47 AM Joshua Brindle
<joshua.brindle@crunchydata.com> wrote:
> <snip>
> > > +
> > > +static inline int mls_context_glblub(struct context *dst, struct context *c1, struct context *c2)
> > > +{
> > > +     struct mls_range *dr = &dst->range, *r1 = &c1->range, *r2 = &c2->range;
> > > +     int rc = 0;
> > > +
> > > +     if (r1->level[1].sens < r2->level[0].sens || r2->level[1].sens < r1->level[0].sens)
> > > +             /* These ranges have no common sensitivities */
> > > +             return -1;
> >
> > I mentioned this on the prior patch, but perhaps you didn't read past
> > the first comment: I think you need to return -EINVAL or some other
> > -errno value here since this will get propagated up to the userspace
> > caller as an errno if I am not mistaken.
>
> Yes, you are right. Sorry about that. I'll fix this on the next spin
> if everyone is okay with everything else.  I think -EINVAL is
> appropriate unless anyone else objects.

Other than this, v3 seems reasonable to me, but it would be good to
see a thumbs-up on the latest userspace patches before we merge this.
Changes to the kernel/user interface are
<haunting_voice>FOREVER</haunting_voice>.

-- 
paul moore
www.paul-moore.com

      reply	other threads:[~2019-08-30 21:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 15:39 [PATCH v3] default_range glblub implementation Joshua Brindle
2019-08-30 15:44 ` Stephen Smalley
2019-08-30 15:47   ` Joshua Brindle
2019-08-30 21:44     ` Paul Moore [this message]

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=CAHC9VhTqe5OFUSwCV-RDa8LEq0Kwv2XE3hZVX078fH42y3Uubw@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=joshua.brindle@crunchydata.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 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).