lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bbc53a25-1b8d-ad3f-fc67-381c7d11a9b1@linux.intel.com>
Date: Wed, 25 Jun 2025 16:13:56 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Armin Wolf <W_Armin@....de>
cc: dimich.dmb@...il.com, Hans de Goede <hdegoede@...hat.com>, 
    kuurtb@...il.com, corbet@....net, platform-driver-x86@...r.kernel.org, 
    LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] platform/x86: wmi: Fix WMI event enablement

On Wed, 25 Jun 2025, Armin Wolf wrote:
> Am 25.06.25 um 14:28 schrieb Ilpo Järvinen:
> > On Fri, 20 Jun 2025, Armin Wolf wrote:
> > 
> > > It turns out that the Windows WMI-ACPI driver always enables/disables
> > > WMI events regardless of whether they are marked as expensive or not.
> > > This finding is further reinforced when reading the documentation of
> > > the WMI_FUNCTION_CONTROL_CALLBACK callback used by Windows drivers
> > > for enabling/disabling WMI devices:
> > > 
> > > 	The DpWmiFunctionControl routine enables or disables
> > > 	notification of events, and enables or disables data
> > > 	collection for data blocks that the driver registered
> > > 	as expensive to collect.
> > > 
> > > Follow this behavior to fix the WMI event used for reporting hotkey
> > > events on the Dell Latitude 5400 and likely many more devices.
> > > 
> > > Reported-by: Dmytro Bagrii <dimich.dmb@...il.com>
> > > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220246
> > > Tested-by: Dmytro Bagrii <dimich.dmb@...il.com>
> > > Fixes: 656f0961d126 ("platform/x86: wmi: Rework WCxx/WExx ACPI method
> > > handling")
> > > Signed-off-by: Armin Wolf <W_Armin@....de>
> > > ---
> > >   drivers/platform/x86/wmi.c | 16 +++++++++++-----
> > >   1 file changed, 11 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> > > index 21b7e54bd7ab..4e86a422f05f 100644
> > > --- a/drivers/platform/x86/wmi.c
> > > +++ b/drivers/platform/x86/wmi.c
> > > @@ -180,16 +180,22 @@ static int wmi_device_enable(struct wmi_device
> > > *wdev, bool enable)
> > >   	acpi_handle handle;
> > >   	acpi_status status;
> > >   -	if (!(wblock->gblock.flags & ACPI_WMI_EXPENSIVE))
> > > -		return 0;
> > > -
> > >   	if (wblock->dev.dev.type == &wmi_type_method)
> > >   		return 0;
> > >   -	if (wblock->dev.dev.type == &wmi_type_event)
> > > +	if (wblock->dev.dev.type == &wmi_type_event) {
> > > +		/*
> > > +		 * Windows always enables/disables WMI events, even when they
> > > are
> > > +		 * not marked as being expensive. We follow this behavior for
> > Hi Armin,
> > 
> > Is the wording in the comment reversed? (I suspect you didn't mean to
> > include "not" into that statement?)
> 
> Actually i did.
> 
> The WMI-ACPI spec seemed to suggest that WMI events should be enabled/disabled
> only if they are being marked as expensive, however it turned out that WMI
> events
> should also be enabled/disabled even if _not_ marked as being expensive.

Okay, fine. I seemingly missed the negation in the ACPI_WMI_EXPENSIVE 
check.

-- 
 i.

> Besides that another user tested this patch on his machine, so:
> 
> Tested-by: Grzegorz Suwaj <grzegorzssuwaj@...il.com>
> 
> Thanks,
> Armin Wolf
> 
> > > +		 * compatibility reasons.
> > > +		 */
> > >   		snprintf(method, sizeof(method), "WE%02X",
> > > wblock->gblock.notify_id);
> > > -	else
> > > +	} else {
> > > +		if (!(wblock->gblock.flags & ACPI_WMI_EXPENSIVE))
> > > +			return 0;
> > > +
> > >   		get_acpi_method_name(wblock, 'C', method);
> > > +	}
> > >     	/*
> > >   	 * Not all WMI devices marked as expensive actually implement the
> > > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ