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] [thread-next>] [day] [month] [year] [list]
Message-ID: <8722f933-010f-44c4-9df7-1417207a34b3@gmx.de>
Date: Wed, 5 Nov 2025 23:10:08 +0100
From: Armin Wolf <W_Armin@....de>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: viro@...iv.linux.org.uk, brauner@...nel.org,
 Hans de Goede <hansg@...nel.org>, jack@...e.cz,
 linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
 platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH 4/4] platform/x86: wmi: Move WMI core code into a separate
 directory

Am 05.11.25 um 10:41 schrieb Ilpo Järvinen:

> On Tue, 4 Nov 2025, Armin Wolf wrote:
>
>> Move the WMI core code into a separate directory to prepare for
>> future additions to the WMI driver.
>>
>> Signed-off-by: Armin Wolf <W_Armin@....de>
>> ---
>>   Documentation/driver-api/wmi.rst           |  2 +-
>>   MAINTAINERS                                |  2 +-
>>   drivers/platform/x86/Kconfig               | 30 +------------------
>>   drivers/platform/x86/Makefile              |  2 +-
>>   drivers/platform/x86/wmi/Kconfig           | 34 ++++++++++++++++++++++
>>   drivers/platform/x86/wmi/Makefile          |  8 +++++
>>   drivers/platform/x86/{wmi.c => wmi/core.c} |  0
>>   7 files changed, 46 insertions(+), 32 deletions(-)
>>   create mode 100644 drivers/platform/x86/wmi/Kconfig
>>   create mode 100644 drivers/platform/x86/wmi/Makefile
>>   rename drivers/platform/x86/{wmi.c => wmi/core.c} (100%)
>>
>> diff --git a/Documentation/driver-api/wmi.rst b/Documentation/driver-api/wmi.rst
>> index 4e8dbdb1fc67..66f0dda153b0 100644
>> --- a/Documentation/driver-api/wmi.rst
>> +++ b/Documentation/driver-api/wmi.rst
>> @@ -16,5 +16,5 @@ which will be bound to compatible WMI devices by the driver core.
>>   .. kernel-doc:: include/linux/wmi.h
>>      :internal:
>>   
>> -.. kernel-doc:: drivers/platform/x86/wmi.c
>> +.. kernel-doc:: drivers/platform/x86/wmi/core.c
>>      :export:
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 46126ce2f968..abc0ff6769a8 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -402,7 +402,7 @@ S:	Maintained
>>   F:	Documentation/ABI/testing/sysfs-bus-wmi
>>   F:	Documentation/driver-api/wmi.rst
>>   F:	Documentation/wmi/
>> -F:	drivers/platform/x86/wmi.c
>> +F:	drivers/platform/x86/wmi/
>>   F:	include/uapi/linux/wmi.h
>>   
>>   ACRN HYPERVISOR SERVICE MODULE
>> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
>> index 46e62feeda3c..ef59425580f3 100644
>> --- a/drivers/platform/x86/Kconfig
>> +++ b/drivers/platform/x86/Kconfig
>> @@ -16,35 +16,7 @@ menuconfig X86_PLATFORM_DEVICES
>>   
>>   if X86_PLATFORM_DEVICES
>>   
>> -config ACPI_WMI
>> -	tristate "WMI"
>> -	depends on ACPI
>> -	help
>> -	  This driver adds support for the ACPI-WMI (Windows Management
>> -	  Instrumentation) mapper device (PNP0C14) found on some systems.
>> -
>> -	  ACPI-WMI is a proprietary extension to ACPI to expose parts of the
>> -	  ACPI firmware to userspace - this is done through various vendor
>> -	  defined methods and data blocks in a PNP0C14 device, which are then
>> -	  made available for userspace to call.
>> -
>> -	  The implementation of this in Linux currently only exposes this to
>> -	  other kernel space drivers.
>> -
>> -	  This driver is a required dependency to build the firmware specific
>> -	  drivers needed on many machines, including Acer and HP laptops.
>> -
>> -	  It is safe to enable this driver even if your DSDT doesn't define
>> -	  any ACPI-WMI devices.
>> -
>> -config ACPI_WMI_LEGACY_DEVICE_NAMES
>> -	bool "Use legacy WMI device naming scheme"
>> -	depends on ACPI_WMI
>> -	help
>> -	  Say Y here to force the WMI driver core to use the old WMI device naming
>> -	  scheme when creating WMI devices. Doing so might be necessary for some
>> -	  userspace applications but will cause the registration of WMI devices with
>> -	  the same GUID to fail in some corner cases.
>> +source "drivers/platform/x86/wmi/Kconfig"
>>   
>>   config WMI_BMOF
>>   	tristate "WMI embedded Binary MOF driver"
>> diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
>> index c7db2a88c11a..c9f6e9275af8 100644
>> --- a/drivers/platform/x86/Makefile
>> +++ b/drivers/platform/x86/Makefile
>> @@ -5,7 +5,7 @@
>>   #
>>   
>>   # Windows Management Interface
>> -obj-$(CONFIG_ACPI_WMI)		+= wmi.o
>> +obj-y				+= wmi/
> Is there a good reason for the first part of the change?
> That is, do you anticipate need for something outside of what this would
> cover:
>
> obj-$(CONFIG_ACPI_WMI)               += wmi/
>
> Other than that, this series looks fine.

The final version will look like this:

wmi-y                   := core.o marshalling.o string.o
obj-$(CONFIG_ACPI_WMI)  += wmi.o

# Unit tests
obj-y                   += tests/

So i think this change is necessary.

Thanks,
Armin Wolf


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ