Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1471656rwd; Thu, 25 May 2023 13:09:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5o5ckeIOj4MWNBCsnK6afvEO8i3/X0jzNKwf+7A+F7vj21iAK78DukKWX1fWeQefd+p4cn X-Received: by 2002:a17:902:e890:b0:1ad:edbe:57a8 with SMTP id w16-20020a170902e89000b001adedbe57a8mr3581241plg.50.1685045365567; Thu, 25 May 2023 13:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685045365; cv=none; d=google.com; s=arc-20160816; b=QBV6jgbXfivvZ/EsB9RaqpTP18E+PaZ1wCtBB6SUA6oakDqOapqaqZp3g6oC6+D5M+ jRxPNcA4AMG9QJkix/ao4ESuAiuDVLg9FTco1xz202V0nPfUcRWc8Ej6oITcyLXfuevm xbZWP398/4hbDMcJc/+vrRyipK4TXtHLi6SgsrOj9KxHnNob4SMA/gdHy9ojYzWpXx/c swbbDS/i58p58F0h55BhDWUI4SaeplsP6vPBGksyX6PtZaMk6yfdKDVVfL8urz2BXTfq v2ygtbvOGKV5f67M0q2eiCfLMlFrpdyzJtb+bqMZDd238q/Iyr8R1SZugzUaWG/ywLGO 9OTQ== 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=nIF4nS4aI6UYDF03seQTWUx2L320yvW6X+vuwnM3gHs=; b=Vbk2IDSvqlk6mkvcGRZFPV4emOOJ3k7DhlC4/vh8b4dlR650YedpyXBPNQb0nD5DIl +qi8H+iVXZV8a/TAJvkquV4ZlZOMellO8893N4xFAMVrZSFbe+chgFnvYBp6yPpwappM wSAuuJO9dHHX+MnnzHbXd4vU/6/uROZ6oI4/sWp9p5t4mrFT2okmJftjFIxu1hvNwTyu Y5ovEGqu7/NQADPcJdqgUmLGeXEgcgSdYD5CuDrW2lJBxfxjDJUf4oTHc5XrjtHx88dG U+uk/W13vCv53wvxXVZUkjruIToGAaJ34BagjMgY4Whb99W5GXUSp4tm0nNz/eIUwGGu lksw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b="HetWuZb/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=eQ4PWgHO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a17090274c800b001ac62935789si2082748plt.468.2023.05.25.13.09.12; Thu, 25 May 2023 13:09:25 -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="HetWuZb/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=eQ4PWgHO; 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 S238874AbjEYTfO (ORCPT + 99 others); Thu, 25 May 2023 15:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242117AbjEYTfL (ORCPT ); Thu, 25 May 2023 15:35:11 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C189E76; Thu, 25 May 2023 12:34:33 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B924E5C0163; Thu, 25 May 2023 15:31:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 25 May 2023 15:31:36 -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=1685043096; x= 1685129496; bh=nIF4nS4aI6UYDF03seQTWUx2L320yvW6X+vuwnM3gHs=; b=H etWuZb/DQn5hyQA486hENqKq91k8fa/wqsbZG9smS994puEzZJ656wEHjrsihNk8 n+PWnI8XgXgZF/IiliScJ8RR/09ShTyL4YRFLG4tWm8us6A5Zp4sqsVulED4HmJz LVqd7LUNdmRO7gXtFkdCE57LrUmMO4ZpuXk2OswIr2YqjEb5YzgVpBYEj+ljvetv oG7bm2faNzWsJs52yx0MFytAk2qMHSJ1TWoqmPlWBoApO1cwUfdKcAmPe8AP6Wxe W9+EM45PjHVfmyJ0jhUGHQwsCm57lkWyoHWVPkphNMutUKx3FrURRJPKTxqtHn/H eE+GrwQy/sazIYuoKhZVg== 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=1685043096; x= 1685129496; bh=nIF4nS4aI6UYDF03seQTWUx2L320yvW6X+vuwnM3gHs=; b=e Q4PWgHOWR3v1M71bF4E4VhTVAm51jlY8CQLDXCUwhhi//Czz6XPiPGhXdyqNi2fX aF5cEJbYNfycQmVj1K/d70shvmidJHqXYUY+AL6m+QdN9W33cNTENjO+gRx3uCMl qH5Ydq1RAZfjwjKat1xIw+kKd0zK1iknoh2UXrTRtfZFH3V5hhpCSg+yx6ZrsLrp KCvWO9zmmDCb9YiSfCLMmGTO0yT3pCLfY2V1s33JaB/XTxrLL5lq6l7mPTRRPfqv chujFyo59Dx/jzucV4r+mBuhPgaNUcAl1e1dsOkt7WPytg21D+BqZsIXiWdGCgG5 NnNRYx1qNItvMN8cj5VHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejjedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 May 2023 15:31:36 -0400 (EDT) From: Mark Pearson 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/5] platform/x86: think-lmi: Correct System password interface Date: Thu, 25 May 2023 15:31:29 -0400 Message-Id: <20230525193132.3727-2-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230525193132.3727-1-mpearson-lenovo@squebb.ca> References: <20230525193132.3727-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,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: X-Mailing-List: linux-kernel@vger.kernel.org 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. Also updated code to use TLMI_SMP_PWD instead of TLMI_SYS_PWD to be in sync with Lenovo documentation. Correct these mistakes. Signed-off-by: Mark Pearson --- Changes in V2: - Updated define name to be SMP_PWD instead of SYS_PWD - Clarified in comments what each password type is. drivers/platform/x86/think-lmi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 2745224f62ab..c7e98fbe7c3d 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -168,11 +168,11 @@ MODULE_PARM_DESC(debug_support, "Enable debug command support"); */ #define LENOVO_CERT_THUMBPRINT_GUID "C59119ED-1C0D-4806-A8E9-59AA318176C4" -#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_CERT (1 << 7) +#define TLMI_POP_PWD (1 << 0) /* Supervisor */ +#define TLMI_PAP_PWD (1 << 1) /* Power-on */ +#define TLMI_HDD_PWD (1 << 2) /* HDD/NVME */ +#define TLMI_SMP_PWD (1 << 6) /* System Management */ +#define TLMI_CERT (1 << 7) /* Certificate Based */ #define to_tlmi_pwd_setting(kobj) container_of(kobj, struct tlmi_pwd_setting, kobj) #define to_tlmi_attr_setting(kobj) container_of(kobj, struct tlmi_attr_setting, kobj) @@ -1509,11 +1509,11 @@ 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; - if (tlmi_priv.pwdcfg.core.password_state & TLMI_SYS_PWD) + if (tlmi_priv.pwdcfg.core.password_state & TLMI_SMP_PWD) tlmi_priv.pwd_system->valid = true; tlmi_priv.pwd_hdd = tlmi_create_auth("hdd", "hdd"); -- 2.40.1