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-next>] [day] [month] [year] [list]
Message-Id: <20201022064047.9827-1-kaichuan.hsieh@canonical.com>
Date:   Thu, 22 Oct 2020 14:40:47 +0800
From:   kaichuan.hsieh@...onical.com
To:     jdelvare@...e.com, linux-kernel@...r.kernel.org
Subject: [PATCH] firmware/dmi: Include product_sku info to modalias

From: Kai-Chuan Hsieh <kaichuan.hsieh@...onical.com>

Some Dell platforms rely on modalias to customize configuration,
the product sku can be more specific for the hardware.

Add product_sku to modalias for better utilization.

Signed-off-by: Kai-Chuan Hsieh <kaichuan.hsieh@...onical.com>
---
 drivers/firmware/dmi-id.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index 86d71b0212b1..26eb01da5392 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -77,21 +77,22 @@ static ssize_t get_modalias(char *buffer, size_t buffer_size)
 		const char *prefix;
 		int field;
 	} fields[] = {
-		{ "bvn", DMI_BIOS_VENDOR },
-		{ "bvr", DMI_BIOS_VERSION },
-		{ "bd",  DMI_BIOS_DATE },
-		{ "br",  DMI_BIOS_RELEASE },
-		{ "efr", DMI_EC_FIRMWARE_RELEASE },
-		{ "svn", DMI_SYS_VENDOR },
-		{ "pn",  DMI_PRODUCT_NAME },
-		{ "pvr", DMI_PRODUCT_VERSION },
-		{ "rvn", DMI_BOARD_VENDOR },
-		{ "rn",  DMI_BOARD_NAME },
-		{ "rvr", DMI_BOARD_VERSION },
-		{ "cvn", DMI_CHASSIS_VENDOR },
-		{ "ct",  DMI_CHASSIS_TYPE },
-		{ "cvr", DMI_CHASSIS_VERSION },
-		{ NULL,  DMI_NONE }
+		{ "bvn",  DMI_BIOS_VENDOR },
+		{ "bvr",  DMI_BIOS_VERSION },
+		{ "bd",   DMI_BIOS_DATE },
+		{ "br",   DMI_BIOS_RELEASE },
+		{ "efr",  DMI_EC_FIRMWARE_RELEASE },
+		{ "svn",  DMI_SYS_VENDOR },
+		{ "pn",   DMI_PRODUCT_NAME },
+		{ "pvr",  DMI_PRODUCT_VERSION },
+		{ "psku", DMI_PRODUCT_SKU },
+		{ "rvn",  DMI_BOARD_VENDOR },
+		{ "rn",   DMI_BOARD_NAME },
+		{ "rvr",  DMI_BOARD_VERSION },
+		{ "cvn",  DMI_CHASSIS_VENDOR },
+		{ "ct",   DMI_CHASSIS_TYPE },
+		{ "cvr",  DMI_CHASSIS_VERSION },
+		{ NULL,   DMI_NONE }
 	};
 
 	ssize_t l, left;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ