Message ID | 1668195533-16761-1-git-send-email-mikelley@microsoft.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp930708wru; Fri, 11 Nov 2022 11:40:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf5x4ONWbhh6Ef+BJll47eMvMnygZZg2W5nu7gI37qcTcVzHNFj+P3fJoh3jdJ8T+a9LEj8x X-Received: by 2002:a17:907:1256:b0:78d:8533:be13 with SMTP id wc22-20020a170907125600b0078d8533be13mr2964550ejb.716.1668195631667; Fri, 11 Nov 2022 11:40:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668195631; cv=pass; d=google.com; s=arc-20160816; b=MqFmmmtTHgQDfs2mKKfsnBTL9QkcoqU9gI2P18ROEno++vqcq49OAcesEVwP4rxEEK CR5pjAWpndrICkaSmCUjXyNseRK0jPc6JEoKqQLqAxrZDOhSBwhStTy71IJ51zaA2qO5 phXd5yxeoZ5BTvNzApX01XxE4ASE6C79pz/TBqgl5txySUJEG3wNlkW8xlkCbsI41XOn SOVlfd3njKYsh0+2ZEPebpj3CTTy6oVMnwQy/REZVVQzSkZtbNX1oyXWs+bM8AavWqa5 /bw+rDp5SMhQCpmhGhlFDBL+Sed3dVGAHuS1B1WQtCFWdblBTY7JCpoDn7GotcgDHLe/ kFuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=hZcRkiQm69eJitYu/z+P4Vn/Emzm0MJXaqcISMacPU8=; b=S0Na8nAHmp0iBx/19zcu+mF4llTv+3R7T6fnwzfZ6kLyNCCiMK73pjeoO5sUIUzsbz z6A0tRNAnmwcm/GEmEzCEvB3mxx+h3QJ5AzoDLlkgJDRoDPQ2jXRE3dWFrXTDZkpxAlk UccRTETEkI27BagzJ51roeatU8Oi+hP9hTd7xU2V0s5NlboWz2QlMWeDoyYMu+T0QhoG Alweg8xpttWNlKKWavkf0kw7R/g+xfyu1Piqb2Z+TJe4ILP15sn3gVdJqV+owCmEz0KV AO2OyhZEicnY+6pg3W5o9dZChp9gzGQdRCtkjj6GazzyBIS1L6hpvDt90j3ZudqxFBr2 peMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=irgoOerR; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk42-20020a1709077faa00b0077cfec3a52fsi2963364ejc.839.2022.11.11.11.40.07; Fri, 11 Nov 2022 11:40:31 -0800 (PST) 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=@microsoft.com header.s=selector2 header.b=irgoOerR; arc=pass (i=1 spf=pass spfdomain=microsoft.com dkim=pass dkdomain=microsoft.com dmarc=pass fromdomain=microsoft.com); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234170AbiKKTjO (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Fri, 11 Nov 2022 14:39:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233965AbiKKTjM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Nov 2022 14:39:12 -0500 Received: from na01-obe.outbound.protection.outlook.com (mail-westcentralusazon11022016.outbound.protection.outlook.com [40.93.200.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60C6A7BE61; Fri, 11 Nov 2022 11:39:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G285MzQRrYzFIyYeIQA5R7s7qTxcEE8ZWyrGEFhpjL0jep3huI2FGiFrnHgw4VRjW8A9rLIg7LWj9nPBjx6PrGrwH97jWB3m9CX6Rs4tw3jShugLNenSAh5WGNA3vubGak29GI1DFGOkofWwgJAsFeqrA3Wg2JBNDbddhch8VJZp5g3FNjWAkPinUmGH3dOD4PoqCmTI1LmvJSiUeENedY5RcUlQs79PF0xAIeEAooDsWXEsYiYa8Qk4QNUQF2kNRumxgN9CjusynA8/F7OV75JFy95uurlvF+cN4GAvruhXluoBCF5+kF/BmP7C4AdPrbTyy7Bqe76gYqkLYkaqXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hZcRkiQm69eJitYu/z+P4Vn/Emzm0MJXaqcISMacPU8=; b=A1rx9bOvA+znD++rrYSf7lyJwI7qO/OLD+0KQ8JudwoKulYdbyd4POzA7dqM/5aJ9TohMy8hZuZFoeSD9WQvcOYMd0Bk9V1lrnniuU+KBU0cSpYW0Bhb5CiA5+2Vbvem0tbRwpsijTsZWiWFICsZopqn6LbFQIoXwMdkOOPwSNYYEKc9UPXYfy8m9sDUFO1x8pHZDsmdrTqM9rpYXAi6xL3ZF3z8BaxtICBQHZz2PT6DiQ9R+TXGeX5Jk0LiSpyYS9waqx+BrczGcOHz8upt2/+tIkkFj2ZZqPPl0QJApF+X80xsK4Z9ntlnuhy0eWXSP7eR07l9Lc6gDSJ0hBK7BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hZcRkiQm69eJitYu/z+P4Vn/Emzm0MJXaqcISMacPU8=; b=irgoOerRjeDthtPLOf/Tbj7Q+v/4uHK6KpRpDqZ89SPnhiobCxWQq+o7JdQ/4G6uibXIKi+ZvkBcYe/aTjrHv7hc4pJ+yWrO3T+A3kEZfi0JTOKZPoCzWktu6f/1BvLoozKgMdiibOPTwNWfWtJIuulQetw5jItdDWWVvnv2c8k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) by MN2PR21MB1502.namprd21.prod.outlook.com (2603:10b6:208:20b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.2; Fri, 11 Nov 2022 19:39:09 +0000 Received: from DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::c3e3:a6ef:232c:299b]) by DM6PR21MB1370.namprd21.prod.outlook.com ([fe80::c3e3:a6ef:232c:299b%7]) with mapi id 15.20.5834.002; Fri, 11 Nov 2022 19:39:09 +0000 From: Michael Kelley <mikelley@microsoft.com> To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca, tomas.winkler@intel.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mikelley@microsoft.com Subject: [PATCH 1/1] tpm/tpm_crb: Fix error message in __crb_relinquish_locality() Date: Fri, 11 Nov 2022 11:38:53 -0800 Message-Id: <1668195533-16761-1-git-send-email-mikelley@microsoft.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain X-ClientProxiedBy: MW4PR03CA0114.namprd03.prod.outlook.com (2603:10b6:303:b7::29) To DM6PR21MB1370.namprd21.prod.outlook.com (2603:10b6:5:16b::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR21MB1370:EE_|MN2PR21MB1502:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ae3e7ec-a418-4b52-1548-08dac41c66e8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MrIU229qqzQdmsX5SrUHkmJp9cGr4+jBM/bqylT/ZRCDJhHIWWRpOqSFxRv7XsJlsbzo1N1RFny6hs5M2iSTDBKokCHDOITkATFa36+E3fnRVFm+XT2zUoJqYdqeepqwpLDMF0YBCbAfmK2uW+wmIb+LMb97OHbB3DeTnRs2GaOjPoFvyPlPedV2AKO7CiL4fcavPxcioOyQlmdHf1CzCAGDULoGwAXBR0YPGkOQoH2MZfKu05D1S6a7hT0p6KuJh2CdsUw4xWxCY2wIsVXnlWoadMkcW6VOcpQ5oezAI5oGJI0I8mD+M1MD6/doRxr28tWXjpyWlMIZn9UE2daymZINNot6lX++rkK+ANLhBbNaKHeJYfdL3OipuVQ8gyV42FfbUBrEI8h6kqGvALwfHgzic6HLV/HsAqto0NM6V7aM61grOhWsF426lL3a0+EVaha4ruiU/pDqQVtL7SHUkBlV/kLF50zalGr2XwUXHarw/15Ye/ORMgD5TTdFCTkYDsQrPo63ogBduDgYpSZGJI+9L1BShsc1PKeA5ifdFJGE1H0wXyYMOjMvnv14H8v2xfezG4mho9Fc5UZeYGxDUv4nB7IK0sS0F8xv0GicxMDi4P3z1HkqlBkc37jTk1SLhX28jcdVdk/IjTm6JzRNbU/houqObNeS6XhZ19qqaKnsErsBxn48U8ROpmLdjtuTnDGCVPRsuNhT6Vw57eEYWIMOT0BH2jyD1S6fg4oQDwtytUf7tHcbNgpsJNbSREUfG2Q+MHifQyNAB2gk62DLE4leBMd035VvwKeE1dyFU1s= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR21MB1370.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(346002)(39860400002)(376002)(136003)(396003)(451199015)(83380400001)(41300700001)(478600001)(82950400001)(66476007)(6486002)(66946007)(82960400001)(8936002)(5660300002)(4326008)(2906002)(66556008)(38350700002)(8676002)(36756003)(316002)(10290500003)(38100700002)(15650500001)(4744005)(2616005)(107886003)(6512007)(186003)(6666004)(52116002)(26005)(6506007)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F7FIadfxTOwZJkU2LMC4anYTLz8Te7qQzvtgq0bYqokWeJNnQT3qY9d6b4JahcImDBu2JQHRTVa0+o6YjpAQhQuDTzoVZ8zXv/+Z5IQxAV3jOOAzGdMi7maOY8idLGeYzAr1wunCpp3FUGurgrebOL3SRGgXtDbh98BkyFQv05Nx3W6sS8/2gr4LITUU8XDnZDykoEZJbNkmBPb83nby5gEiF3HbV5CjG9KGaEwaNpx85nvjXyH0ljg6Qu2ynwF0Pa+5OpXCHoc22bFEVL6bcpC2LyjTxC8YRNh+ammYg6rx90ZIBGlABvfIUhN/+Isn76UEv0FUo5M+BZB+7vksIhUH62LEjfiw5GtNXwMfvLPgxuuLsiDaTELvti4WjEWTsjL9yof+6Hs5f3SoKoDNDBmH0C9S8Dy7g0zcmz+8yxMsGCCBvFaLR8e1l4JnQuPWZIOYBWWBDi+NNBh1Wb0g1dp94Im1GYuxcUA4bV6w1z/D+E4ng0j+huu0b28mVVaJqac5m95Za7nPAyxUyPh1w+yoa9hbVh+qkVlXZ2PmSQyrU/lIpN7OawBUXnK/REM5EYOb44zqPungdFxkObdggoW0CuuHjngRSMV7hKFdphIADSzjX3w6KZ5dT5LOaFfWkIhN1ON6edv3GW60j7F0ehEm1jOi5yl32pJSgzO3JfCTwHoOL1qXPzCxrMFIXOpBVUMF/1ejSEXUSqjuBnU2SIdqZM95omc2iTqZhFPGPkCTd1D2pG+yjT/4XNFXDEJFOSAcbcf+E+WBvLoxZgluz7vQgpPNsgN1PbSW09VFiy2JXASurajSAcrIQjTVLKWyeqC/42qnTJRWK6Twp2FjvHgYKVI0uejVswLIJE9G9qbwsQq1O5nqXlV+2d5WNEWHwKCpmx/X0909+5o5YLYEEGZhDitBd3DVZ8RPbhk4aSrcaRHxewbSOad+tpJzG26q+Jl+tvG/Gh+04rnt14KhiKSzh1gqUjy06XpdBW9jCeBHtXVnMvSk6TifdoeRKkbc11GhYjF2OkvVO8VhJpyHPj8ksDWU1X95jJrlJZB2xft9664T1BtvT/hqjpxfYuaiy7fizeAQhHTrlPlPP8jWM8Q7iNhKLxoURdXYz3W8oRgMN8FSHo+lefTD3p8VnEv/LyCF3hQkgu2+IYnNLGEy3jpHw0lnfKbdnn9RdIrBTl3/NCerOBNbGoQE6LvW7m0O3uojExCYQliMHdpKixNZxN+wOdjo6OCm4CCfg/ZyBxAMklye81DhSHI15DxYo5yaGgIZsnNvzFf2ZB5qF55oK7HSWM2r/enfGBN1wMcWe+X/v6seZ80vpHsHVn+VDuWHUjSDfiXGb/sYPAXUpFoaEzNA338G/m3oulSP/b1k1Fnp0jPSwcGmK5yLq1oiHXpJj0tJUjqIhB35mIYsxfgm127yGxLCor1LSQ2t8heKAkv8oDSj6cuoe7aZZtP+fKZOyZMJEBOVi6onVL/8PtMey2j9A19nAVRgEPNRYMWrLM/cbFDzhh/o51UxXeSeVbmADhAPahT1C3aKaNnmAtxdO79D4NPwFnikAgB6se8vIc9JUZmuNOdgm1xBJAb3kN3l X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ae3e7ec-a418-4b52-1548-08dac41c66e8 X-MS-Exchange-CrossTenant-AuthSource: DM6PR21MB1370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 19:39:09.3148 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BmiGsFlRy2hqVksuxgZROl6bS4rotXa51sOj88/w7vp0Cath6v3rn/NK1z2kso8oEe5+YGY0asNqfVOc4tm3lQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR21MB1502 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE autolearn=no 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?1749229902878889934?= X-GMAIL-MSGID: =?utf-8?q?1749229902878889934?= |
Series |
[1/1] tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
|
|
Commit Message
Michael Kelley (LINUX)
Nov. 11, 2022, 7:38 p.m. UTC
The error message in __crb_relinquish_locality() mentions requestAccess
instead of Relinquish. Fix it.
Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after granting locality")
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
---
drivers/char/tpm/tpm_crb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message----- > From: Michael Kelley <mikelley@microsoft.com> > Sent: Friday, November 11, 2022 21:39 > To: peterhuewe@gmx.de; jarkko@kernel.org; jgg@ziepe.ca; Winkler, Tomas > <tomas.winkler@intel.com>; linux-integrity@vger.kernel.org; linux- > kernel@vger.kernel.org > Cc: mikelley@microsoft.com > Subject: [PATCH 1/1] tpm/tpm_crb: Fix error message in > __crb_relinquish_locality() > > The error message in __crb_relinquish_locality() mentions requestAccess > instead of Relinquish. Fix it. > > Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after > granting locality") > Signed-off-by: Michael Kelley <mikelley@microsoft.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> > --- > drivers/char/tpm/tpm_crb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index > 1860665..65f8f17 100644 > --- a/drivers/char/tpm/tpm_crb.c > +++ b/drivers/char/tpm/tpm_crb.c > @@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev, > iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); > if (!crb_wait_for_reg_32(&priv->regs_h->loc_state, mask, value, > TPM2_TIMEOUT_C)) { > - dev_warn(dev, "TPM_LOC_STATE_x.requestAccess timed > out\n"); > + dev_warn(dev, "TPM_LOC_STATE_x.Relinquish timed > out\n"); > return -ETIME; > } > > -- > 1.8.3.1
From: Winkler, Tomas <tomas.winkler@intel.com> Sent: Saturday, November 12, 2022 11:33 AM > > -----Original Message----- > > From: Michael Kelley <mikelley@microsoft.com> > > Sent: Friday, November 11, 2022 21:39 > > To: peterhuewe@gmx.de; jarkko@kernel.org; jgg@ziepe.ca; Winkler, Tomas > > <tomas.winkler@intel.com>; linux-integrity@vger.kernel.org; linux- > > kernel@vger.kernel.org > > Cc: mikelley@microsoft.com > > Subject: [PATCH 1/1] tpm/tpm_crb: Fix error message in > > __crb_relinquish_locality() > > > > The error message in __crb_relinquish_locality() mentions requestAccess > > instead of Relinquish. Fix it. > > > > Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after > > granting locality") > > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > Acked-by: Tomas Winkler <tomas.winkler@intel.com> Is there a maintainer who can pick up this fix? It's not time critical; I'm just trying to make sure it doesn't get lost. Thanks, Michael > > > --- > > drivers/char/tpm/tpm_crb.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index > > 1860665..65f8f17 100644 > > --- a/drivers/char/tpm/tpm_crb.c > > +++ b/drivers/char/tpm/tpm_crb.c > > @@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev, > > iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); > > if (!crb_wait_for_reg_32(&priv->regs_h->loc_state, mask, value, > > TPM2_TIMEOUT_C)) { > > - dev_warn(dev, "TPM_LOC_STATE_x.requestAccess timed > > out\n"); > > + dev_warn(dev, "TPM_LOC_STATE_x.Relinquish timed > > out\n"); > > return -ETIME; > > } > > > > -- > > 1.8.3.1
On Fri, Nov 11, 2022 at 11:38:53AM -0800, Michael Kelley wrote: > The error message in __crb_relinquish_locality() mentions requestAccess > instead of Relinquish. Fix it. > > Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after granting locality") > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > --- > drivers/char/tpm/tpm_crb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > index 1860665..65f8f17 100644 > --- a/drivers/char/tpm/tpm_crb.c > +++ b/drivers/char/tpm/tpm_crb.c > @@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev, > iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); > if (!crb_wait_for_reg_32(&priv->regs_h->loc_state, mask, value, > TPM2_TIMEOUT_C)) { > - dev_warn(dev, "TPM_LOC_STATE_x.requestAccess timed out\n"); > + dev_warn(dev, "TPM_LOC_STATE_x.Relinquish timed out\n"); > return -ETIME; > } > > -- > 1.8.3.1 > Please explain. BR, Jarkko
From: Jarkko Sakkinen <jarkko@kernel.org> Sent: Sunday, November 27, 2022 8:39 AM > > On Fri, Nov 11, 2022 at 11:38:53AM -0800, Michael Kelley wrote: > > The error message in __crb_relinquish_locality() mentions requestAccess > > instead of Relinquish. Fix it. > > > > Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after granting locality") > > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > > --- > > drivers/char/tpm/tpm_crb.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > > index 1860665..65f8f17 100644 > > --- a/drivers/char/tpm/tpm_crb.c > > +++ b/drivers/char/tpm/tpm_crb.c > > @@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev, > > iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); > > if (!crb_wait_for_reg_32(&priv->regs_h->loc_state, mask, value, > > TPM2_TIMEOUT_C)) { > > - dev_warn(dev, "TPM_LOC_STATE_x.requestAccess timed out\n"); > > + dev_warn(dev, "TPM_LOC_STATE_x.Relinquish timed out\n"); > > return -ETIME; > > } > > > > -- > > 1.8.3.1 > > > > Please explain. > There are two parallel functions: __crb_request_locality() and __crb_relinquish_locality(). In the current code, both return the same text in the error message if a timeout occurs. That error message seems appropriate for __crb_request_locality() since it is setting the "requestAccess" bit. But the error message seems inappropriate for __crb_relinquish_locality(), which is setting the "Relinquish" bit. So the patch changes the error message to indicate that the timeout occurred in setting the Relinquish bit. I'm looking at Section 6.5.3.2.2.1 in the TCG PC Client Platform TPM Profile Specification for TPM 2.0, Version 1.05 Revision 14. This is where the "requestAccess" and "Relinquish" bits are defined. Or maybe I am not understanding what you are getting at with "Please explain." Michael
On Tue, Nov 29, 2022 at 04:34:09AM +0000, Michael Kelley (LINUX) wrote: > From: Jarkko Sakkinen <jarkko@kernel.org> Sent: Sunday, November 27, 2022 8:39 AM > > > > On Fri, Nov 11, 2022 at 11:38:53AM -0800, Michael Kelley wrote: > > > The error message in __crb_relinquish_locality() mentions requestAccess > > > instead of Relinquish. Fix it. > > > > > > Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after granting locality") > > > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > > > --- > > > drivers/char/tpm/tpm_crb.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > > > index 1860665..65f8f17 100644 > > > --- a/drivers/char/tpm/tpm_crb.c > > > +++ b/drivers/char/tpm/tpm_crb.c > > > @@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev, > > > iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); > > > if (!crb_wait_for_reg_32(&priv->regs_h->loc_state, mask, value, > > > TPM2_TIMEOUT_C)) { > > > - dev_warn(dev, "TPM_LOC_STATE_x.requestAccess timed out\n"); > > > + dev_warn(dev, "TPM_LOC_STATE_x.Relinquish timed out\n"); > > > return -ETIME; > > > } > > > > > > -- > > > 1.8.3.1 > > > > > > > Please explain. > > > > There are two parallel functions: __crb_request_locality() and > __crb_relinquish_locality(). In the current code, both return the > same text in the error message if a timeout occurs. That > error message seems appropriate for __crb_request_locality() > since it is setting the "requestAccess" bit. > > But the error message seems inappropriate for > __crb_relinquish_locality(), which is setting the "Relinquish" bit. > So the patch changes the error message to indicate that the > timeout occurred in setting the Relinquish bit. > > I'm looking at Section 6.5.3.2.2.1 in the TCG PC Client Platform > TPM Profile Specification for TPM 2.0, Version 1.05 Revision 14. > This is where the "requestAccess" and "Relinquish" bits are defined. > > Or maybe I am not understanding what you are getting at with > "Please explain." I misread the callback name, when I first looked into this (in too much rush). You're absolutely correct. Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> BR, Jarkko
On Sun, Dec 04, 2022 at 07:51:20PM +0000, Jarkko Sakkinen wrote: > On Tue, Nov 29, 2022 at 04:34:09AM +0000, Michael Kelley (LINUX) wrote: > > From: Jarkko Sakkinen <jarkko@kernel.org> Sent: Sunday, November 27, 2022 8:39 AM > > > > > > On Fri, Nov 11, 2022 at 11:38:53AM -0800, Michael Kelley wrote: > > > > The error message in __crb_relinquish_locality() mentions requestAccess > > > > instead of Relinquish. Fix it. > > > > > > > > Fixes: 888d867df441 ("tpm: cmd_ready command can be issued only after granting locality") > > > > Signed-off-by: Michael Kelley <mikelley@microsoft.com> > > > > --- > > > > drivers/char/tpm/tpm_crb.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > > > > index 1860665..65f8f17 100644 > > > > --- a/drivers/char/tpm/tpm_crb.c > > > > +++ b/drivers/char/tpm/tpm_crb.c > > > > @@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev, > > > > iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); > > > > if (!crb_wait_for_reg_32(&priv->regs_h->loc_state, mask, value, > > > > TPM2_TIMEOUT_C)) { > > > > - dev_warn(dev, "TPM_LOC_STATE_x.requestAccess timed out\n"); > > > > + dev_warn(dev, "TPM_LOC_STATE_x.Relinquish timed out\n"); > > > > return -ETIME; > > > > } > > > > > > > > -- > > > > 1.8.3.1 > > > > > > > > > > Please explain. > > > > > > > There are two parallel functions: __crb_request_locality() and > > __crb_relinquish_locality(). In the current code, both return the > > same text in the error message if a timeout occurs. That > > error message seems appropriate for __crb_request_locality() > > since it is setting the "requestAccess" bit. > > > > But the error message seems inappropriate for > > __crb_relinquish_locality(), which is setting the "Relinquish" bit. > > So the patch changes the error message to indicate that the > > timeout occurred in setting the Relinquish bit. > > > > I'm looking at Section 6.5.3.2.2.1 in the TCG PC Client Platform > > TPM Profile Specification for TPM 2.0, Version 1.05 Revision 14. > > This is where the "requestAccess" and "Relinquish" bits are defined. > > > > Or maybe I am not understanding what you are getting at with > > "Please explain." > > I misread the callback name, when I first looked into this (in > too much rush). You're absolutely correct. > > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git BR, Jarkko
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index 1860665..65f8f17 100644 --- a/drivers/char/tpm/tpm_crb.c +++ b/drivers/char/tpm/tpm_crb.c @@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev, iowrite32(CRB_LOC_CTRL_RELINQUISH, &priv->regs_h->loc_ctrl); if (!crb_wait_for_reg_32(&priv->regs_h->loc_state, mask, value, TPM2_TIMEOUT_C)) { - dev_warn(dev, "TPM_LOC_STATE_x.requestAccess timed out\n"); + dev_warn(dev, "TPM_LOC_STATE_x.Relinquish timed out\n"); return -ETIME; }