lkml.org 
[lkml]   [2017]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 10/15] platform/x86: dell-smbios: add filtering capability for requests
On Fri, Oct 13, 2017 at 08:46:11PM +0100, One Thousand Gnomes wrote:
> > I think I'd actually like to meld this with your other ideas and what I've
> > currently got. What do you think of this approach:
> >
> > /* kernel community doesn't feel userspace should have access at all
> > * or other kernel drivers use this
> > */
> > if (blacklisted)
> > return NO;
> >
> > /* unprivileged access allowed */
> > if (whitelisted & (capabilities && whitelist->capability_need) ==
> > whitelist->capability_need))
> > return ALLOWED;
> >
> > /* not yet in whitelist, or need privs to do */
> > if (capable(CAP_SYS_RAWIO))
> > return ALLOWED;
> >
> > return NO
> >
>
> This looks sensible to me. Note that the middle case isn't necessarily
> 'unprviliged'. If the entyr is whitelisted and the capability_need is 0
> then it means 'anyone' but you can also set any other appropriate
> capability (eg CAP_NET_ADMIN for a WMI call that does stuff to the wifi).

Thank you Alan. This model appears consistent in intent with some of the higher
level WMI access privileges in the Windows OS, and translate fairly well to
Linux.

This seems like a good model at least for the dell smbios driver in this thread.

I do have some concerns about the ability to audit the buffer in the general
case. Dell uses a sensible buffer format with 'command' and 'class' fields, but
the WMI spec explicitly makes no requirement on the format of the buffer. This
may prove much harder to implement for other vendors depending on their format -
but perhaps we accept that and deal with that as it comes up.

--
Darren Hart
VMware Open Source Technology Center

\
 
 \ /
  Last update: 2017-10-14 00:17    [W:0.307 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site