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: <f3b5c138-5576-4c01-b177-7450f1e91d24@app.fastmail.com>
Date: Tue, 10 Jun 2025 08:28:49 -0400
From: "Mark Pearson" <mpearson-lenovo@...ebb.ca>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: "Hans de Goede" <hdegoede@...hat.com>, "Jonathan Corbet" <corbet@....net>,
 ikepanhc@...il.com, "Henrique de Moraes Holschuh" <hmh@....eng.br>,
 "Armin Wolf" <W_Armin@....de>,
 "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>,
 linux-doc@...r.kernel.org,
 "platform-driver-x86@...r.kernel.org" <platform-driver-x86@...r.kernel.org>,
 ibm-acpi-devel@...ts.sourceforge.net, LKML <linux-kernel@...r.kernel.org>,
 "kernel test robot" <lkp@...el.com>
Subject: Re: [PATCH v3 2/2] platform/x86: thinklmi: improved DMI handling

Hi Ilpo,

On Tue, Jun 10, 2025, at 3:35 AM, Ilpo Järvinen wrote:
> On Mon, 9 Jun 2025, Mark Pearson wrote:
>
>> Fix issues reported by kernel test robot.
>>  - Require DMI for think-lmi.
>>  - Check return from getting serial string
>> 
>> Reported-by: kernel test robot <lkp@...el.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202506062319.F0IpDxF6-lkp@intel.com/
>> 
>> Signed-off-by: Mark Pearson <mpearson-lenovo@...ebb.ca>
>> ---
>>  - New patch added to series.
>> 
>>  drivers/platform/x86/lenovo/Kconfig     | 1 +
>>  drivers/platform/x86/lenovo/think-lmi.c | 8 +++++---
>>  2 files changed, 6 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/platform/x86/lenovo/Kconfig b/drivers/platform/x86/lenovo/Kconfig
>> index a4b565283768..207dd7f88ed0 100644
>> --- a/drivers/platform/x86/lenovo/Kconfig
>> +++ b/drivers/platform/x86/lenovo/Kconfig
>> @@ -197,6 +197,7 @@ config THINKPAD_ACPI_HOTKEY_POLL
>>  config THINKPAD_LMI
>>  	tristate "Lenovo WMI-based systems management driver"
>>  	depends on ACPI_WMI
>> +	depends on DMI
>>  	select FW_ATTR_CLASS
>>  	help
>>  	  This driver allows changing BIOS settings on Lenovo machines whose
>> diff --git a/drivers/platform/x86/lenovo/think-lmi.c b/drivers/platform/x86/lenovo/think-lmi.c
>> index 143d9fdedb65..8f70c60f791f 100644
>> --- a/drivers/platform/x86/lenovo/think-lmi.c
>> +++ b/drivers/platform/x86/lenovo/think-lmi.c
>> @@ -772,6 +772,7 @@ static ssize_t certificate_store(struct kobject *kobj,
>>  	struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj);
>>  	enum cert_install_mode install_mode = TLMI_CERT_INSTALL;
>>  	char *auth_str, *new_cert;
>> +	const char *serial;
>>  	char *signature;
>>  	char *guid;
>>  	int ret;
>> @@ -789,9 +790,10 @@ static ssize_t certificate_store(struct kobject *kobj,
>>  			return -EACCES;
>>  
>>  		/* Format: 'serial#, signature' */
>> -		auth_str = cert_command(setting,
>> -					dmi_get_system_info(DMI_PRODUCT_SERIAL),
>> -					setting->signature);
>> +		serial = dmi_get_system_info(DMI_PRODUCT_SERIAL);
>> +		if (!serial)
>> +			return -EINVAL;
>
> This should not return -EINVAL as it is not a problem with the input 
> parameters. Perhaps -ENODEV would make sense instead?
>

Good point.
Unless Andy strongly thinks I should drop this bit, I'll fix in the next version

Thanks
Mark

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ