From: Darren Hart <dvhart@infradead.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: Mario.Limonciello@dell.com,
"Greg KH" <gregkh@linuxfoundation.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Pali Rohár" <pali.rohar@gmail.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: Re: WMI and Kernel:User interface
Date: Wed, 10 May 2017 16:23:26 -0700 [thread overview]
Message-ID: <20170510232326.GD11404@fury> (raw)
In-Reply-To: <CALCETrWDRSScOFMaC+fKFEryUjd3i4t=wsxmjSS+PAiwi6onww@mail.gmail.com>
On Wed, May 10, 2017 at 03:50:44PM -0700, Andy Lutomirski wrote:
> On Wed, May 10, 2017 at 3:02 PM, <Mario.Limonciello@dell.com> wrote:
> > So here's a "more" realistic scenario:
> >
> > OEM has support through a WMI function to control keyboard backlight timeouts
> > and intensity. That same WMI function also can support turning on/off an individual
> > USB port. Backlight timeouts are done by setting the first argument to "1" and USB
> > port control is done by setting first argument to "2".
> >
> > Some userspace app is developed that can control both of these functions through
> > the chardev. Later an enterprising young kernel developer realizes that backlight
> > control should be done through a platform driver instead.
> >
> > They write a platform driver to do it, and add a filter to block "1" arguments from
> > userspace. Now if the userspace app tries to call the chardev with the "1" argument
> > some error code is returned indicating this request is not supported.
> >
> > The result is the userspace app broke, but it broke because the kernel is supporting
> > the method in a much smarter and more scalable way.
>
> There's another possibility: the filter could intercept the "1"
> argument and change the brightness.
That would be a good way to deal with regressions if we encounter them after
filtering a call. In general we would want to filter as few calls as possible,
and only if there is a detrimental effect for both userspace and the kernel
using the call. e.g. if the backlight call is stateless, then there is no
problem with both userspace and the kernel using it.
> FWIW, I think that almost anything the kernel did with a real WMI API
> would be better than the ugly things that drivers like dcdbas allow.
>
> --Andy
>
--
Darren Hart
VMware Open Source Technology Center
next prev parent reply other threads:[~2017-05-10 23:23 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 [this message]
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
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=20170510232326.GD11404@fury \
--to=dvhart@infradead.org \
--cc=Mario.Limonciello@dell.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--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