Re: [PATCH] capability: WARN when invalid capability is requested rather than BUG/panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-09-30 at 11:28 -0500, Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@xxxxxxxxxx):

> > > Perhaps we should have CAP_TO_INDEX mask itself?
> > > 
> > > #define CAP_TO_INDEX(x)		(((x) >> 5) & _KERNEL_CAPABILITY_U32S)
> > 
> > Well, you save a branch and won't get the pagefault so it does 'fix' the
> > pagefault/panic from cap code.  It doesn't tell us when others screw up
> > and SELinux is still possibly going to BUG().  We are also going to
> > actually be returning a permission decision not on what was requested
> > but on something wholely different.
> 
> So exactly what was requested?

A capability that they cannot possibly have since it doesn't exist  :)

> > I like mine better, but I'm ok with yours and can just do my changes in
> > SELinux if this is how cap wants to handle it.  I don't really like the
> 
> Heh I don't like either one, just thought this would reduce the overhead
> a bit :)

No argument from me that patching up for buggy drivers sucks.  Yours
would be less overhead, and it would return the cap system back to
pre-2.6.25 operation (garbage in garbage out but no panic).  Since we
already have the branch in SELinux its no 'extra' overhead to EPERM
there instead of here (garbage in EPERM out).

-Eric


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux