From: Darren Hart <dvhart@infradead.org>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Mario Limonciello <mario_limonciello@dell.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rafael Wysocki <rjw@rjwysocki.net>,
Andy Lutomirski <luto@amacapital.net>,
LKML <linux-kernel@vger.kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: Re: WMI and Kernel:User interface
Date: Tue, 13 Jun 2017 10:40:27 -0700 [thread overview]
Message-ID: <20170613174027.GL27850@fury> (raw)
In-Reply-To: <201706131916.12144@pali>
On Tue, Jun 13, 2017 at 07:16:11PM +0200, Pali Rohár wrote:
> On Tuesday 13 June 2017 17:38:57 Darren Hart wrote:
> > I'll mention this again I suspect in this thread, but rather than a
> > "WMI filter" we can implement a "WMI proxy". If a kernel driver
> > needs to own certain WMI calls for LED or Radio management, for
> > example, all such calls can be proxied through that driver. It can
> > do the necessary work to update its own state, and still perform the
> > requested funtion, transparent to the userspace caller. This should
> > accommodate the addition of new drivers and features to kernel
> > drivers, without precluding the development of userspace management
> > or platform daemons.
>
> Such WMI proxy implemented in every WMI driver has one design problem:
>
> There would be two different kernel APIs to configure some firmware
> settings. E.g. if particular WMI method implements turning on/off radio
> devices, then functionality would be exported to userspace via:
>
> 1) standard kernel rfkill interface which is device/driver/firmware
> neutral (and any rfkill application can control it)
>
> 2) platform/firmware specific WMI method via newly standard /dev/wmi*
> interface -- and only vendor specific application could do that and it
> would work only for this one specific WMI GUID device
Yes, platform specific control is what WMI is for.
> I do not like idea to have two kernel <--> userspace interfaces to
> control one thing, plus one interface would be platform dependent.
>
> In my opinion any management application which want to control radio
> switches should use option 1) rfkill interface.
Agreed, they should.
> And I do not see reason for exporting same duplicate, but platform
> dependent interface from kernel to userspace.
>
So this question boils down to: do we export WMI to userspace or not?
The WMI GUIDs and methods will not be divided across convenient Linux
subsystem boundaries allowing us to pick and choose what we export. If
we export WMI to userspace, we will be providing another means of
access. Sometimes, this may cause conflict, and the answer may just be
"don't do that".
There are plenty of other examples of things you can do to screw up the
state of your system if you have the right permissions for which the
answer is "don't do that". Consider MEM(4), SETPCI(8), ... /dev/sda ...
for example.
So we can either export them and possibly offer some means of proxying
where necessary, or we can not export them.
--
Darren Hart
VMware Open Source Technology Center
next prev parent reply other threads:[~2017-06-13 17:40 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 23:16 WMI and Kernel:User interface Darren Hart
2017-05-10 5:13 ` Greg Kroah-Hartman
2017-05-10 6:11 ` Darren Hart
2017-05-10 22:02 ` Mario.Limonciello
2017-05-10 22:11 ` Darren Hart
2017-05-10 22:50 ` Andy Lutomirski
2017-05-10 23:23 ` Darren Hart
2017-05-10 23:27 ` Darren Hart
2017-06-03 19:50 ` Darren Hart
2017-06-09 6:41 ` Greg Kroah-Hartman
2017-06-10 0:46 ` Darren Hart
2017-06-10 10:36 ` Pali Rohár
2017-06-12 17:02 ` Darren Hart
2017-06-12 22:17 ` Pali Rohár
2017-06-13 1:24 ` Darren Hart
2017-06-13 7:05 ` Christoph Hellwig
2017-06-13 12:07 ` Pali Rohár
2017-06-13 15:44 ` Darren Hart
2017-06-13 16:05 ` Greg Kroah-Hartman
2017-06-13 16:24 ` Darren Hart
2017-06-13 15:38 ` Darren Hart
2017-06-13 15:50 ` Greg Kroah-Hartman
2017-06-13 15:56 ` Andy Lutomirski
2017-06-13 16:12 ` Mario.Limonciello
2017-06-13 16:57 ` Greg KH
2017-06-13 17:43 ` Pali Rohár
2017-06-13 16:39 ` Darren Hart
2017-06-13 16:22 ` Darren Hart
2017-06-13 16:52 ` Greg Kroah-Hartman
2017-06-13 17:07 ` Darren Hart
2017-06-14 4:38 ` Greg Kroah-Hartman
2017-06-19 22:10 ` Andy Lutomirski
2017-06-20 3:37 ` Darren Hart
2017-06-20 7:29 ` Pali Rohár
2017-06-13 17:16 ` Pali Rohár
2017-06-13 17:40 ` Darren Hart [this message]
2017-06-13 18:00 ` Pali Rohár
2017-06-13 18:09 ` Darren Hart
2017-06-14 0:28 ` Bernd Petrovitsch
2017-06-13 12:51 ` Pali Rohár
2017-06-13 16:07 ` Darren Hart
2017-06-19 21:24 ` Matthew Garrett
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=20170613174027.GL27850@fury \
--to=dvhart@infradead.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mario_limonciello@dell.com \
--cc=pali.rohar@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=torvalds@linux-foundation.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