Message ID | 20230517181945.3725-2-mpearson-lenovo@squebb.ca |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1336457vqo; Wed, 17 May 2023 11:24:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6d+FkX+zld40mdLfFb5GURono0SAxHGoKzOKqxcHSinh7t7QXTo3d2gXemXJRgj94OetFu X-Received: by 2002:a17:90a:8414:b0:252:ffbd:fc1c with SMTP id j20-20020a17090a841400b00252ffbdfc1cmr528718pjn.27.1684347845786; Wed, 17 May 2023 11:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684347845; cv=none; d=google.com; s=arc-20160816; b=pGCy4HP0cN9XEHnCGg4nNfv8yztA0GmWWXMc9YYVFrZqlWEbgYqezKUbGsTzGPIa9X 7VQno6oc95072jv+i1RtgK3g/7yOlEximzvggpVY8YA6RgJkeZsMZFH4AdggqbgQ68M5 tZwa1UVAIPspBxai2pf/N+RRkscIzikZ81ROxIlPhZ1HJKBvZAL0v9SYOHh+NgSrR31O ERwjo4t+j07naDC22F0W+RaHBt5Krr0vutRpnqpg+oHUL3Bt0a71BsvJpoPJSJPLah6f MhL31Md7dLFE2qFHcH6kGzN5M+DDvBQrs7SVPGFTXpSAKh+Sha/lLwzdSc8/UOxDznJo VpGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=9To+EmgUW3U3bAfyN/Fi0ZyDnM5B92IoNonvDRNfTQ8=; b=SY0AYoiwygn+0E6ocoZrjMIEqLBc7lCjDHOaQqVnhqQN9nuK9mcj6405rz/k2wxEWB 1aD8t8doFVE90qQcedWJQKfIDHzWeXpGePk3yCZLLKzl8+kZylysMLXl32UMifMO3v2q nMqo2bJV+LxBAjoPJy9Usltzb0gAfF24SzFAblrdo2FZQ3fN7FKWYDgqM1tc8uPo3y0+ ntSlil1FKqptO2Lqukdx+cmkkhBrUGKpKMRajBSuUw+I6vDjY3IC+ACmGk38Rh6GL8bS oz68+SV8sF1Qt9yPJBVrHqnHeOU/+ste7OhpIFq+TUSRsDjT2J3ezyNkNteXBFLWPWP2 SJHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=u5pk54aR; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="Sm/C6R1u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl18-20020a17090b385200b0024b9e5aa258si2666717pjb.0.2023.05.17.11.23.50; Wed, 17 May 2023 11:24:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=u5pk54aR; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="Sm/C6R1u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbjEQSUF (ORCPT <rfc822;abdi.embedded@gmail.com> + 99 others); Wed, 17 May 2023 14:20:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjEQSUB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 17 May 2023 14:20:01 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC2351739; Wed, 17 May 2023 11:20:00 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 3ADC95C00D4; Wed, 17 May 2023 14:20:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 17 May 2023 14:20:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1684347600; x= 1684434000; bh=9To+EmgUW3U3bAfyN/Fi0ZyDnM5B92IoNonvDRNfTQ8=; b=u 5pk54aREflRZ5sOV8yRRKYngyY/6zd12WwowW2vj4EAk//Je8pebyziVVrRpmg4j 9egssOJCoE6nTubYbzkjpwiqb0HG8DgeazxZDPUCH9n6a1Vttt8P37GJOcTXozXc tDtLKHdBfmQ1diEj0ngtRDTLKlAMJuBGHv3mwtXlRl3G8A701BvXQYEoKSrydyeH 5BuMpaxEVpETyQZZp6v4juoUPAYld/TmTonSgjqjizLWRdnwppMfqqImJvbgcqxB rzm7m5MNSQg8mYAvPH8td04UgX4V6tp1W97sSsDYZYYaejnENwnwoMv0fDphtpHs usNd93nBLP490FsucbCDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1684347600; x= 1684434000; bh=9To+EmgUW3U3bAfyN/Fi0ZyDnM5B92IoNonvDRNfTQ8=; b=S m/C6R1uTVKzgLvmvfLIkXLdR4md3lK+TPEK3cLUc2SvjdRL7lVA0eUIAzYlBUU9/ 2Q7dtGHXtEl6JMekyhp2pKAY6kgq+K/Yvx4GWl6pYGZsUhnzU5THWDlZavaDGWEH LfAoj2PduHycBE6DzQTwzKRZK3D3DVhUmJeUYYrK8CCIHXqNezCnJSlsnjQb4u8Z YGa2qI37piBmfnMIo1n56TiwBCgV3r9IfPuFx1iTx9HNcgNf2BziiN9prdacWJbl Le4lMrL5UKgSiN4BusE1DH64WLIct88U4zceV3vo4sx/YPXSQjIBncOW99pFeJgK sRDYA/g4+qu2gCsPOLKbA== X-ME-Sender: <xms:0BplZCmYHYAum0hYkleZPGFlXQeXO5d9KuGzwB4UWzdSq7jbw37e-Q> <xme:0BplZJ27ED_9JnMwCVaCQoFgHL0AkDTvQ2_SnzXPIIKb2R3R2ETK-e4vGmXUq0z_n tJz8nt-621n5DckMN8> X-ME-Received: <xmr:0BplZApIy_Szj21l6mmysEqn55i_DLhe5d07BbcaYpsgSijov-6L1tJyZYFHJLLVgvCgSL4KkHSwMDY-5okaGUbG_YluFyLN-rTzH6NAnZzsvHc1bZIL8-z3yA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeiuddguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: <xmx:0BplZGkUYjdnHN1DtRF-kkqslXtHO7kHY8BM7LaVkGjul8kN96lmhw> <xmx:0BplZA3LKM5XKg4maf5oZIielOKlKWGG5883ocVu_bzq1C_HbnFV8Q> <xmx:0BplZNu-rmTSPN3W3lkX11R_X647QML34LTaeduc5As4c_CwTds1aQ> <xmx:0BplZNwEYAMjCDzoGtt-m3eEScYv_mO2cDwfYkd6Ow9smPQvT7pxcg> Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 May 2023 14:19:59 -0400 (EDT) From: Mark Pearson <mpearson-lenovo@squebb.ca> To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] platform/x86: think-lmi: Correct System password interface Date: Wed, 17 May 2023 14:19:43 -0400 Message-Id: <20230517181945.3725-2-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230517181945.3725-1-mpearson-lenovo@squebb.ca> References: <mpearson-lenovo@squebb.ca> <20230517181945.3725-1-mpearson-lenovo@squebb.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766166726793065627?= X-GMAIL-MSGID: =?utf-8?q?1766166726793065627?= |
Series |
[1/4] platform/x86: think-lmi: Enable opcode support on BIOS settings
|
|
Commit Message
Mark Pearson
May 17, 2023, 6:19 p.m. UTC
The system password identification was incorrect. This means that if
the password was enabled it wouldn't be detected correctly; and setting
it would not work.
Correct these mistakes.
Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
---
drivers/platform/x86/think-lmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Hi Mark, On 5/17/23 20:19, Mark Pearson wrote: > The system password identification was incorrect. This means that if > the password was enabled it wouldn't be detected correctly; and setting > it would not work. > > Correct these mistakes. > > Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> > --- > drivers/platform/x86/think-lmi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c > index d9341305eba9..b8431d3b137f 100644 > --- a/drivers/platform/x86/think-lmi.c > +++ b/drivers/platform/x86/think-lmi.c > @@ -171,7 +171,7 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support"); > #define TLMI_POP_PWD (1 << 0) > #define TLMI_PAP_PWD (1 << 1) > #define TLMI_HDD_PWD (1 << 2) > -#define TLMI_SYS_PWD (1 << 3) > +#define TLMI_SYS_PWD (1 << 6) > #define TLMI_CERT (1 << 7) > > #define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj) > @@ -1504,7 +1504,7 @@ static int tlmi_analyze(void) > tlmi_priv.pwd_power->valid = true; > > if (tlmi_priv.opcode_support) { > - tlmi_priv.pwd_system = tlmi_create_auth("sys", "system"); > + tlmi_priv.pwd_system = tlmi_create_auth("smp", "system"); "smp" ? Also this is not explained in the commit message. Regards, Hans > if (!tlmi_priv.pwd_system) > goto fail_clear_attr; >
Thanks Hans On Tue, May 23, 2023, at 6:46 AM, Hans de Goede wrote: > Hi Mark, > > On 5/17/23 20:19, Mark Pearson wrote: >> The system password identification was incorrect. This means that if >> the password was enabled it wouldn't be detected correctly; and setting >> it would not work. >> >> Correct these mistakes. >> >> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> >> --- >> drivers/platform/x86/think-lmi.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c >> index d9341305eba9..b8431d3b137f 100644 >> --- a/drivers/platform/x86/think-lmi.c >> +++ b/drivers/platform/x86/think-lmi.c >> @@ -171,7 +171,7 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support"); >> #define TLMI_POP_PWD (1 << 0) >> #define TLMI_PAP_PWD (1 << 1) >> #define TLMI_HDD_PWD (1 << 2) >> -#define TLMI_SYS_PWD (1 << 3) >> +#define TLMI_SYS_PWD (1 << 6) >> #define TLMI_CERT (1 << 7) >> >> #define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj) >> @@ -1504,7 +1504,7 @@ static int tlmi_analyze(void) >> tlmi_priv.pwd_power->valid = true; >> >> if (tlmi_priv.opcode_support) { >> - tlmi_priv.pwd_system = tlmi_create_auth("sys", "system"); >> + tlmi_priv.pwd_system = tlmi_create_auth("smp", "system"); > > "smp" ? Yes - that is what is common across all the platforms. https://docs.lenovocdrt.com/#/bios/wmi/wmi_guide?id=change-a-bios-password I never quite got a straight answer on the origins of the 'sys' account - I think it may have been originally intended but never used? Or maybe it's always been wrong. I should change the define to be TLMI_SMP_PWD instead actually for clarity. I'll fix that. > > Also this is not explained in the commit message. > Ack - will update the commit message to include this. Thanks Mark
Hi, On 5/23/23 14:43, Mark Pearson wrote: > Thanks Hans > > On Tue, May 23, 2023, at 6:46 AM, Hans de Goede wrote: >> Hi Mark, >> >> On 5/17/23 20:19, Mark Pearson wrote: >>> The system password identification was incorrect. This means that if >>> the password was enabled it wouldn't be detected correctly; and setting >>> it would not work. >>> >>> Correct these mistakes. >>> >>> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> >>> --- >>> drivers/platform/x86/think-lmi.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c >>> index d9341305eba9..b8431d3b137f 100644 >>> --- a/drivers/platform/x86/think-lmi.c >>> +++ b/drivers/platform/x86/think-lmi.c >>> @@ -171,7 +171,7 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support"); >>> #define TLMI_POP_PWD (1 << 0) >>> #define TLMI_PAP_PWD (1 << 1) >>> #define TLMI_HDD_PWD (1 << 2) >>> -#define TLMI_SYS_PWD (1 << 3) >>> +#define TLMI_SYS_PWD (1 << 6) >>> #define TLMI_CERT (1 << 7) >>> >>> #define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj) >>> @@ -1504,7 +1504,7 @@ static int tlmi_analyze(void) >>> tlmi_priv.pwd_power->valid = true; >>> >>> if (tlmi_priv.opcode_support) { >>> - tlmi_priv.pwd_system = tlmi_create_auth("sys", "system"); >>> + tlmi_priv.pwd_system = tlmi_create_auth("smp", "system"); >> >> "smp" ? > > Yes - that is what is common across all the platforms. > https://docs.lenovocdrt.com/#/bios/wmi/wmi_guide?id=change-a-bios-password Ok, so smp stands for System Management Password I guess ? Might be good to spell that out somehwere, e.g. in a comment. Regards, Hans > > I never quite got a straight answer on the origins of the 'sys' account - I think it may have been originally intended but never used? Or maybe it's always been wrong. > > I should change the define to be TLMI_SMP_PWD instead actually for clarity. I'll fix that. > >> >> Also this is not explained in the commit message. >> > > Ack - will update the commit message to include this. > > Thanks > Mark >
On Tue, May 23, 2023, at 9:27 AM, Hans de Goede wrote: > Hi, > > On 5/23/23 14:43, Mark Pearson wrote: >> Thanks Hans >> >> On Tue, May 23, 2023, at 6:46 AM, Hans de Goede wrote: >>> Hi Mark, >>> >>> On 5/17/23 20:19, Mark Pearson wrote: >>>> The system password identification was incorrect. This means that if >>>> the password was enabled it wouldn't be detected correctly; and setting >>>> it would not work. >>>> >>>> Correct these mistakes. >>>> >>>> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> >>>> --- >>>> drivers/platform/x86/think-lmi.c | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c >>>> index d9341305eba9..b8431d3b137f 100644 >>>> --- a/drivers/platform/x86/think-lmi.c >>>> +++ b/drivers/platform/x86/think-lmi.c >>>> @@ -171,7 +171,7 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support"); >>>> #define TLMI_POP_PWD (1 << 0) >>>> #define TLMI_PAP_PWD (1 << 1) >>>> #define TLMI_HDD_PWD (1 << 2) >>>> -#define TLMI_SYS_PWD (1 << 3) >>>> +#define TLMI_SYS_PWD (1 << 6) >>>> #define TLMI_CERT (1 << 7) >>>> >>>> #define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj) >>>> @@ -1504,7 +1504,7 @@ static int tlmi_analyze(void) >>>> tlmi_priv.pwd_power->valid = true; >>>> >>>> if (tlmi_priv.opcode_support) { >>>> - tlmi_priv.pwd_system = tlmi_create_auth("sys", "system"); >>>> + tlmi_priv.pwd_system = tlmi_create_auth("smp", "system"); >>> >>> "smp" ? >> >> Yes - that is what is common across all the platforms. >> https://docs.lenovocdrt.com/#/bios/wmi/wmi_guide?id=change-a-bios-password > > Ok, so smp stands for System Management Password I guess ? Might be > good to spell > that out somehwere, e.g. in a comment. > Yes - and will do. Mark
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index d9341305eba9..b8431d3b137f 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -171,7 +171,7 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support"); #define TLMI_POP_PWD (1 << 0) #define TLMI_PAP_PWD (1 << 1) #define TLMI_HDD_PWD (1 << 2) -#define TLMI_SYS_PWD (1 << 3) +#define TLMI_SYS_PWD (1 << 6) #define TLMI_CERT (1 << 7) #define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj) @@ -1504,7 +1504,7 @@ static int tlmi_analyze(void) tlmi_priv.pwd_power->valid = true; if (tlmi_priv.opcode_support) { - tlmi_priv.pwd_system = tlmi_create_auth("sys", "system"); + tlmi_priv.pwd_system = tlmi_create_auth("smp", "system"); if (!tlmi_priv.pwd_system) goto fail_clear_attr;