* [PATCH] platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter
@ 2025-11-27 20:29 Mark Pearson
2025-12-19 15:38 ` Mark Pearson
2025-12-22 14:42 ` Ilpo Järvinen
0 siblings, 2 replies; 3+ messages in thread
From: Mark Pearson @ 2025-11-27 20:29 UTC (permalink / raw)
To: mpearson-lenovo; +Cc: hansg, ilpo.jarvinen, platform-driver-x86, linux-kernel
The ThinkCenter team are adding WMI certificate thumbprint support.
Updating the driver to enable it. They are using the same GUID as
Thinkpad/ThinkStation.
Tested on M75q Gen 5.
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
---
drivers/platform/x86/lenovo/think-lmi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/lenovo/think-lmi.c b/drivers/platform/x86/lenovo/think-lmi.c
index 540b472b1bf3..c45f0206b4ab 100644
--- a/drivers/platform/x86/lenovo/think-lmi.c
+++ b/drivers/platform/x86/lenovo/think-lmi.c
@@ -195,7 +195,7 @@ static const struct tlmi_cert_guids thinkpad_cert_guid = {
};
static const struct tlmi_cert_guids thinkcenter_cert_guid = {
- .thumbprint = NULL,
+ .thumbprint = LENOVO_CERT_THUMBPRINT_GUID, /* Same GUID as TP */
.set_bios_setting = LENOVO_TC_SET_BIOS_SETTING_CERT_GUID,
.save_bios_setting = LENOVO_TC_SAVE_BIOS_SETTING_CERT_GUID,
.cert_to_password = LENOVO_TC_CERT_TO_PASSWORD_GUID,
@@ -709,6 +709,10 @@ static ssize_t cert_thumbprint(char *buf, const char *arg, int count)
if (!tlmi_priv.cert_guid->thumbprint)
return -EOPNOTSUPP;
+ /* Older ThinkCenter BIOS may not have support */
+ if (!wmi_has_guid(tlmi_priv.cert_guid->thumbprint))
+ return -EOPNOTSUPP;
+
status = wmi_evaluate_method(tlmi_priv.cert_guid->thumbprint, 0, 0, &input, &output);
if (ACPI_FAILURE(status)) {
kfree(output.pointer);
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter
2025-11-27 20:29 [PATCH] platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter Mark Pearson
@ 2025-12-19 15:38 ` Mark Pearson
2025-12-22 14:42 ` Ilpo Järvinen
1 sibling, 0 replies; 3+ messages in thread
From: Mark Pearson @ 2025-12-19 15:38 UTC (permalink / raw)
Cc: Hans de Goede, Ilpo Järvinen, platform-driver-x86, linux-kernel
On Thu, Nov 27, 2025, at 3:29 PM, Mark Pearson wrote:
> The ThinkCenter team are adding WMI certificate thumbprint support.
>
> Updating the driver to enable it. They are using the same GUID as
> Thinkpad/ThinkStation.
> Tested on M75q Gen 5.
>
> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
> ---
> drivers/platform/x86/lenovo/think-lmi.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/lenovo/think-lmi.c
> b/drivers/platform/x86/lenovo/think-lmi.c
> index 540b472b1bf3..c45f0206b4ab 100644
> --- a/drivers/platform/x86/lenovo/think-lmi.c
> +++ b/drivers/platform/x86/lenovo/think-lmi.c
> @@ -195,7 +195,7 @@ static const struct tlmi_cert_guids
> thinkpad_cert_guid = {
> };
>
> static const struct tlmi_cert_guids thinkcenter_cert_guid = {
> - .thumbprint = NULL,
> + .thumbprint = LENOVO_CERT_THUMBPRINT_GUID, /* Same GUID as TP */
> .set_bios_setting = LENOVO_TC_SET_BIOS_SETTING_CERT_GUID,
> .save_bios_setting = LENOVO_TC_SAVE_BIOS_SETTING_CERT_GUID,
> .cert_to_password = LENOVO_TC_CERT_TO_PASSWORD_GUID,
> @@ -709,6 +709,10 @@ static ssize_t cert_thumbprint(char *buf, const
> char *arg, int count)
> if (!tlmi_priv.cert_guid->thumbprint)
> return -EOPNOTSUPP;
>
> + /* Older ThinkCenter BIOS may not have support */
> + if (!wmi_has_guid(tlmi_priv.cert_guid->thumbprint))
> + return -EOPNOTSUPP;
> +
> status = wmi_evaluate_method(tlmi_priv.cert_guid->thumbprint, 0, 0,
> &input, &output);
> if (ACPI_FAILURE(status)) {
> kfree(output.pointer);
> --
> 2.43.0
Would it be possible to get a review for this please? It's pretty minor and would like to get this feature available to users.
Thanks
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter
2025-11-27 20:29 [PATCH] platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter Mark Pearson
2025-12-19 15:38 ` Mark Pearson
@ 2025-12-22 14:42 ` Ilpo Järvinen
1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2025-12-22 14:42 UTC (permalink / raw)
To: Mark Pearson; +Cc: hansg, platform-driver-x86, linux-kernel
On Thu, 27 Nov 2025 15:29:48 -0500, Mark Pearson wrote:
> The ThinkCenter team are adding WMI certificate thumbprint support.
>
> Updating the driver to enable it. They are using the same GUID as
> Thinkpad/ThinkStation.
> Tested on M75q Gen 5.
>
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter
commit: 05126063605f26f9228c69b1ff232ac6e78f72ab
--
i.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-22 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-27 20:29 [PATCH] platform/x86: think-lmi: Add WMI certificate thumbprint support for ThinkCenter Mark Pearson
2025-12-19 15:38 ` Mark Pearson
2025-12-22 14:42 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®