Re: WMI and Kernel:User interface

2017-06-20 Thread Pali Rohár
On Monday 19 June 2017 20:37:25 Darren Hart wrote: > dell-wmi: > Type and code, where type may be, for example, "sequence" and then each byte > of > buffen length is processed as a key. It is more complicated. Buffer can contain more sequences (each has own length) and each sequence can contain d

Re: WMI and Kernel:User interface

2017-06-19 Thread Darren Hart
On Mon, Jun 19, 2017 at 03:10:09PM -0700, Andy Lutomirski wrote: > On Tue, Jun 13, 2017 at 9:38 PM, Greg Kroah-Hartman > wrote: > > On Tue, Jun 13, 2017 at 10:07:19AM -0700, Darren Hart wrote: > >> On Tue, Jun 13, 2017 at 06:52:47PM +0200, Greg Kroah-Hartman wrote: > >> > > As a concrete example,

Re: WMI and Kernel:User interface

2017-06-19 Thread Matthew Garrett
On Tue, May 09, 2017 at 04:16:39PM -0700, Darren Hart wrote: > To address this, I have proposed [3] that exporting WMI be opt-in, only done > at > the request of and in collaboration with a vendor, with the kernel platform > driver given the opportunity to filter requests. This filtering would ne

Re: WMI and Kernel:User interface

2017-06-19 Thread Andy Lutomirski
On Tue, Jun 13, 2017 at 9:38 PM, Greg Kroah-Hartman wrote: > On Tue, Jun 13, 2017 at 10:07:19AM -0700, Darren Hart wrote: >> On Tue, Jun 13, 2017 at 06:52:47PM +0200, Greg Kroah-Hartman wrote: >> > > As a concrete example, Dell has specifically made the request that we >> > > work on a solution th

Re: WMI and Kernel:User interface

2017-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 13, 2017 at 10:07:19AM -0700, Darren Hart wrote: > On Tue, Jun 13, 2017 at 06:52:47PM +0200, Greg Kroah-Hartman wrote: > > > As a concrete example, Dell has specifically made the request that we > > > work on a solution that doesn't require them to come back to the kernel > > > communit

Re: WMI and Kernel:User interface

2017-06-13 Thread Bernd Petrovitsch
On Tue, 2017-06-13 at 10:40 -0700, Darren Hart wrote: [...] > 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 w

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 08:00:30PM +0200, Pali Rohár wrote: > > I just tried to show that proposed proxy has above problem and looks > like anti-pattern for linux kernel. As this should be evaluated when > going to accept or reject it. OK, I think at this point we need to follow Greg's advice a

Re: WMI and Kernel:User interface

2017-06-13 Thread Pali Rohár
On Tuesday 13 June 2017 19:40:27 Darren Hart wrote: > 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

Re: WMI and Kernel:User interface

2017-06-13 Thread Pali Rohár
Hi Greg! I will try to explain that problem with calling WMI functions. On Tuesday 13 June 2017 18:57:14 Greg KH wrote: > > Getting there requires work in a few areas: > > 1) The OEM/IBV exports the methods and the MOF (in binary form) > > that describes the objects that can be interacted with and

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
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

Re: WMI and Kernel:User interface

2017-06-13 Thread Pali Rohár
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 thro

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 06:52:47PM +0200, Greg Kroah-Hartman wrote: > > As a concrete example, Dell has specifically made the request that we > > work on a solution that doesn't require them to come back to the kernel > > community each time they add a WMI GUID to their BIOS. They would like > > to

Re: WMI and Kernel:User interface

2017-06-13 Thread Greg KH
On Tue, Jun 13, 2017 at 04:12:41PM +, mario.limoncie...@dell.com wrote: > > > So 2-3 months seems really long to me. > > > > > > > Unless you catch the cycle just right, 8 weeks is normal for the delay to > get a patch through a distro to an end user's machine. > They go through their own st

Re: WMI and Kernel:User interface

2017-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 13, 2017 at 09:22:42AM -0700, Darren Hart wrote: > On Tue, Jun 13, 2017 at 05:50:00PM +0200, Greg Kroah-Hartman wrote: > > > The patch is trivial, but the process is time consuming. Two to Three > > > months to see an ID added and released is big blocker for contemporary > > > life cycl

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 08:56:42AM -0700, Andy Lutomirski wrote: > On Tue, Jun 13, 2017 at 8:50 AM, Greg Kroah-Hartman > wrote: > > On Tue, Jun 13, 2017 at 08:38:57AM -0700, Darren Hart wrote: > >> On Tue, Jun 13, 2017 at 12:05:35AM -0700, Christoph Hellwig wrote: > >> > Hi Darren, > >> > > >> > f

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 06:05:47PM +0200, Greg Kroah-Hartman wrote: > On Tue, Jun 13, 2017 at 08:44:19AM -0700, Darren Hart wrote: > > > In some cases filter function can be simple in some cases hard. I can > > > image that usage of while listing, plus in some cases also filtering > > > (when it wo

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 05:50:00PM +0200, Greg Kroah-Hartman wrote: > > The patch is trivial, but the process is time consuming. Two to Three > > months to see an ID added and released is big blocker for contemporary > > life cycles. > > Wait, what? Please explain. > > Yes, it could take worse c

RE: WMI and Kernel:User interface

2017-06-13 Thread Mario.Limonciello
Shevchenko ; Rafael Wysocki > ; LKML ; platform-driver- > x...@vger.kernel.org > Subject: Re: WMI and Kernel:User interface > > On Tue, Jun 13, 2017 at 8:50 AM, Greg Kroah-Hartman > wrote: > > On Tue, Jun 13, 2017 at 08:38:57AM -0700, Darren Hart wrote: > >> On Tu

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 02:51:07PM +0200, Pali Rohár wrote: > If function of that WMI method is in Windows world handled by userspace, > it does not mean that in Linux we need to create way how to handle such > thing in userspace -- argument "WMI was designed to access firmware > functions from use

Re: WMI and Kernel:User interface

2017-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 13, 2017 at 08:44:19AM -0700, Darren Hart wrote: > > In some cases filter function can be simple in some cases hard. I can > > image that usage of while listing, plus in some cases also filtering > > (when it would be relatively easy to implement). > > See my response to Christoph - to

Re: WMI and Kernel:User interface

2017-06-13 Thread Andy Lutomirski
On Tue, Jun 13, 2017 at 8:50 AM, Greg Kroah-Hartman wrote: > On Tue, Jun 13, 2017 at 08:38:57AM -0700, Darren Hart wrote: >> On Tue, Jun 13, 2017 at 12:05:35AM -0700, Christoph Hellwig wrote: >> > Hi Darren, >> > >> > first - can you please properly trim your replies and don't write >> > more than

Re: WMI and Kernel:User interface

2017-06-13 Thread Greg Kroah-Hartman
On Tue, Jun 13, 2017 at 08:38:57AM -0700, Darren Hart wrote: > On Tue, Jun 13, 2017 at 12:05:35AM -0700, Christoph Hellwig wrote: > > Hi Darren, > > > > first - can you please properly trim your replies and don't write > > more than 7 characters per line? > > Sure... (although I think you've done

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 02:07:41PM +0200, Pali Rohár wrote: > On Tuesday 13 June 2017 00:05:35 Christoph Hellwig wrote: > > On Mon, Jun 12, 2017 at 06:24:35PM -0700, Darren Hart wrote: > > > This is a big topic for sure. Speed and scale of platform enabling is > > > something > > > I would like to

Re: WMI and Kernel:User interface

2017-06-13 Thread Darren Hart
On Tue, Jun 13, 2017 at 12:05:35AM -0700, Christoph Hellwig wrote: > Hi Darren, > > first - can you please properly trim your replies and don't write > more than 7 characters per line? Sure... (although I think you've done all the necessary pruning for this response). 70 I presume you mean? I usu

Re: WMI and Kernel:User interface

2017-06-13 Thread Pali Rohár
On Monday 12 June 2017 18:24:35 Darren Hart wrote: > > One thing is design of some system, another thing is real usage. We know > > that WMI is used for reporting events when some keys are pressed (e.g. > > Fn keys) or used for enabling/disabling of radio devices or controlling > > keyboard/LID

Re: WMI and Kernel:User interface

2017-06-13 Thread Pali Rohár
On Tuesday 13 June 2017 00:05:35 Christoph Hellwig wrote: > On Mon, Jun 12, 2017 at 06:24:35PM -0700, Darren Hart wrote: > > This is a big topic for sure. Speed and scale of platform enabling is > > something > > I would like to see us support better. The barrier to entry to kernel > > changes is

Re: WMI and Kernel:User interface

2017-06-13 Thread Christoph Hellwig
Hi Darren, first - can you please properly trim your replies and don't write more than 7 characters per line? On Mon, Jun 12, 2017 at 06:24:35PM -0700, Darren Hart wrote: > This is a big topic for sure. Speed and scale of platform enabling is > something > I would like to see us support better.

Re: WMI and Kernel:User interface

2017-06-12 Thread Darren Hart
On Tue, Jun 13, 2017 at 12:17:28AM +0200, Pali Rohár wrote: > On Monday 12 June 2017 19:02:49 Darren Hart wrote: > > On Sat, Jun 10, 2017 at 12:36:40PM +0200, Pali Rohár wrote: > > > On Saturday 10 June 2017 02:46:41 Darren Hart wrote: > > > > On Fri, Jun 09, 2017 at 08:41:51AM +0200, Greg Kroah-Ha

Re: WMI and Kernel:User interface

2017-06-12 Thread Pali Rohár
On Monday 12 June 2017 19:02:49 Darren Hart wrote: > On Sat, Jun 10, 2017 at 12:36:40PM +0200, Pali Rohár wrote: > > On Saturday 10 June 2017 02:46:41 Darren Hart wrote: > > > On Fri, Jun 09, 2017 at 08:41:51AM +0200, Greg Kroah-Hartman > > > wrote: > > > > On Sat, Jun 03, 2017 at 12:50:58PM -0700,

Re: WMI and Kernel:User interface

2017-06-12 Thread Darren Hart
On Sat, Jun 10, 2017 at 12:36:40PM +0200, Pali Rohár wrote: > On Saturday 10 June 2017 02:46:41 Darren Hart wrote: > > On Fri, Jun 09, 2017 at 08:41:51AM +0200, Greg Kroah-Hartman wrote: > > > On Sat, Jun 03, 2017 at 12:50:58PM -0700, Darren Hart wrote: > > > > On Wed, May 10, 2017 at 07:13:41AM +0

Re: WMI and Kernel:User interface

2017-06-10 Thread Pali Rohár
On Saturday 10 June 2017 02:46:41 Darren Hart wrote: > On Fri, Jun 09, 2017 at 08:41:51AM +0200, Greg Kroah-Hartman wrote: > > On Sat, Jun 03, 2017 at 12:50:58PM -0700, Darren Hart wrote: > > > On Wed, May 10, 2017 at 07:13:41AM +0200, Greg Kroah-Hartman > > > wrote: > > > > On Tue, May 09, 2017 at

Re: WMI and Kernel:User interface

2017-06-09 Thread Darren Hart
On Fri, Jun 09, 2017 at 08:41:51AM +0200, Greg Kroah-Hartman wrote: > On Sat, Jun 03, 2017 at 12:50:58PM -0700, Darren Hart wrote: > > On Wed, May 10, 2017 at 07:13:41AM +0200, Greg Kroah-Hartman wrote: > > > On Tue, May 09, 2017 at 04:16:39PM -0700, Darren Hart wrote: > > > > Linus and Greg, > > >

Re: WMI and Kernel:User interface

2017-06-08 Thread Greg Kroah-Hartman
On Sat, Jun 03, 2017 at 12:50:58PM -0700, Darren Hart wrote: > On Wed, May 10, 2017 at 07:13:41AM +0200, Greg Kroah-Hartman wrote: > > On Tue, May 09, 2017 at 04:16:39PM -0700, Darren Hart wrote: > > > Linus and Greg, > > > > > > We are in the process of redesigning the Windows Management > > > I

Re: WMI and Kernel:User interface

2017-06-03 Thread Darren Hart
On Wed, May 10, 2017 at 07:13:41AM +0200, Greg Kroah-Hartman wrote: > On Tue, May 09, 2017 at 04:16:39PM -0700, Darren Hart wrote: > > Linus and Greg, > > > > We are in the process of redesigning the Windows Management Instrumentation > > (WMI) [1] system in the kernel. WMI is the Microsoft implem

Re: WMI and Kernel:User interface

2017-05-10 Thread Darren Hart
On Wed, May 10, 2017 at 10:02:46PM +, mario.limoncie...@dell.com wrote: > This above discussion is confusing because it's referring specifically to > "WMI events". > related to brightness keypresses that don't make sense to go to userspace. Let's elaborate on this point. Why are events not in

Re: WMI and Kernel:User interface

2017-05-10 Thread Darren Hart
On Wed, May 10, 2017 at 03:50:44PM -0700, Andy Lutomirski wrote: > On Wed, May 10, 2017 at 3:02 PM, 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 supp

Re: WMI and Kernel:User interface

2017-05-10 Thread Andy Lutomirski
On Wed, May 10, 2017 at 3:02 PM, 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

Re: WMI and Kernel:User interface

2017-05-10 Thread Darren Hart
Mario > > ; Pali Rohár ; Andy > > Shevchenko ; Rafael Wysocki > > ; Andy Lutomirski ; LKML > ker...@vger.kernel.org>; platform-driver-...@vger.kernel.org > > Subject: Re: WMI and Kernel:User interface > > > > On Wed, May 10, 2017 at 07:13:41AM +0200,

RE: WMI and Kernel:User interface

2017-05-10 Thread Mario.Limonciello
ker...@vger.kernel.org>; platform-driver-...@vger.kernel.org > Subject: Re: WMI and Kernel:User interface > > On Wed, May 10, 2017 at 07:13:41AM +0200, Greg Kroah-Hartman wrote: > > On Tue, May 09, 2017 at 04:16:39PM -0700, Darren Hart wrote: > > > Linus and Greg, > >

Re: WMI and Kernel:User interface

2017-05-09 Thread Darren Hart
On Wed, May 10, 2017 at 07:13:41AM +0200, Greg Kroah-Hartman wrote: > On Tue, May 09, 2017 at 04:16:39PM -0700, Darren Hart wrote: > > Linus and Greg, > > > > We are in the process of redesigning the Windows Management Instrumentation > > (WMI) [1] system in the kernel. WMI is the Microsoft implem

Re: WMI and Kernel:User interface

2017-05-09 Thread Greg Kroah-Hartman
On Tue, May 09, 2017 at 04:16:39PM -0700, Darren Hart wrote: > Linus and Greg, > > We are in the process of redesigning the Windows Management Instrumentation > (WMI) [1] system in the kernel. WMI is the Microsoft implementation of > Web-Based > Enterprise Management (WBEM). We are looking to pro

WMI and Kernel:User interface

2017-05-09 Thread Darren Hart
Linus and Greg, We are in the process of redesigning the Windows Management Instrumentation (WMI) [1] system in the kernel. WMI is the Microsoft implementation of Web-Based Enterprise Management (WBEM). We are looking to provide WMI access to userspace, while allowing the kernel to filter requests