Message ID | 20230502011558.10743-1-jarkko@kernel.org |
---|---|
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 b10csp286295vqo; Mon, 1 May 2023 18:24:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UxQJDozWH4xXRdr+dHfjJY2jGDEPakUtgEWq9RN2qcN02Z64TzWDsaZu+kTZuo2dTOiDq X-Received: by 2002:a05:6a21:3a91:b0:f0:6517:2fd with SMTP id zv17-20020a056a213a9100b000f0651702fdmr15933464pzb.2.1682990664436; Mon, 01 May 2023 18:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682990664; cv=none; d=google.com; s=arc-20160816; b=bSGMhBPfjKq9ohBOAQYl+pkY/bMCz0Re4NB623baHvNCi4c6Gnp5FQSz2S9vffE3qj rEeCSjm2TNYbfAdnsFjiCp/rh5r65eFa34uJrUJWMFQ7XV5Bh3Ioe+KrpTfJUqq05izi cHRaXdK6pMi9QixSNOn9birMcP2US/mbWD1I65HGhR5AIa+MFvTlK55YWPKosIjra6iA nTFKZ5VCvLroM2+i90cvAdMmwy5fpp4dAcJ13WyJ8bZmJ1HBGHb20jpnkTQujBqJ0H4H kfT51V6TlkC63vd6h+EtXk8JAG3rCWps5dQtXmL7Mvar8S0FSeEjqoyCm4l/PdBQnZDm outg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2yFTHFuxeahqxUPSxsLgNvZLqBUJ19PS5Uzors3iZgk=; b=efDAkOaCNHjesnrGOCoDt3JDsK/fHzSsjAtcm2mL7TvUDKufsilRMGrdXfDveugzYo AZvfsm0UvS69Oc+Mi2YVo+/pz7YnElc6gxNBxFPah0U/1HL5JE2ZxoPNP64JnB57wVdX HEag1YMqI9Yq4p6hOE/h7U13ZvHV18rbf7uvltinc4CBfpdsPV6OPi7v3L2Q8Y3Mw4yt QRgwD7QmkGIHx22kwIRZbcmbXra8uU557tBaVwHxd3T/DBAJXKjuBnr/Y+b/plzCjAHw nwOm9+U9IDAmlwkR3rP/15NZuWRVpMbAz0WhlRlDFmbBhlzJ14mW0/L6mCs8ALOflgbN SrEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RzXIqAlc; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a62520e000000b00640f213b6fesi16104772pfb.240.2023.05.01.18.24.11; Mon, 01 May 2023 18:24:24 -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=@kernel.org header.s=k20201202 header.b=RzXIqAlc; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233338AbjEBBQL (ORCPT <rfc822;rbbytesnap@gmail.com> + 99 others); Mon, 1 May 2023 21:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232402AbjEBBQJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 1 May 2023 21:16:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C27A3A9C; Mon, 1 May 2023 18:16:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9731861BFD; Tue, 2 May 2023 01:16:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BA18C433EF; Tue, 2 May 2023 01:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682990167; bh=mpizqtC9n7gms+NgcPrguFcPPmQI6Fuzo7V2f0cMDa4=; h=From:To:Cc:Subject:Date:From; b=RzXIqAlcvmLbZKzQCurP61KJBmXAQpcTUBtXyghMwpEF613okk/tcfVTZ4vJYyJR2 rbbysmSArzN9JXJtwh3s8OxrbOqwxK3ZYh3zztRzCteqa49JDhVxi+f/NJsaV10v9s Xi3XoJnTXZ5caQqMH+9yZvx5Q337twKn9IkyB4X8UFuv978XhuSlKE86iqVGdU1rw2 Ik/xirR+8zL08M1yNSRPga+V5JXF15a0D67Xe9yzLOiMMO+yjHGsStmB588WhVR+mX I/lSf9tu3V0b5F8Y/m2yCwM/ljx6lJq4cWRs0jnqGnFyYXWg8YinVwUMpQvff0004J kMH7NDkcRckOw== From: Jarkko Sakkinen <jarkko@kernel.org> To: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Sakkinen <jarkko@kernel.org>, Vlastimil Babka <vbabka@suse.cz>, "Jason A . Donenfeld" <Jason@zx2c4.com>, Jason Gunthorpe <jgg@ziepe.ca>, Jerry Snitselaar <jsnitsel@redhat.com> Subject: [PATCH v2 0/2] Fix TPM 1.2 resume Date: Tue, 2 May 2023 04:15:56 +0300 Message-Id: <20230502011558.10743-1-jarkko@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1764743619099186755?= X-GMAIL-MSGID: =?utf-8?q?1764743619099186755?= |
Series | Fix TPM 1.2 resume | |
Message
Jarkko Sakkinen
May 2, 2023, 1:15 a.m. UTC
During TPM 1.2 resume, the first PCR read operation used inside tpm1_do_selftest() fails. Fix the bugs preventing resume from working. v2: * Added Jerry's reviewed-by's. * Rebased to 865fdb08197e ("Merge tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input"). * Mirrored patches to linux-next. Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Jason A. Donenfeld <Jason@zx2c4.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jerry Snitselaar <jsnitsel@redhat.com> Link: https://lore.kernel.org/linux-integrity/CS6UJMSTVA4L.FRQ5VL1I1EF4@suppilovahvero/T/#m236d62184229cc035605143fde10933bcde60065 Jarkko Sakkinen (2): tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume tpm: Prevent hwrng from activating during resume drivers/char/tpm/tpm-chip.c | 4 +++ drivers/char/tpm/tpm-interface.c | 10 ++++++++ drivers/char/tpm/tpm_tis_core.c | 43 ++++++++++++++------------------ include/linux/tpm.h | 1 + 4 files changed, 34 insertions(+), 24 deletions(-)
Comments
On 5/2/23 03:15, Jarkko Sakkinen wrote: > During TPM 1.2 resume, the first PCR read operation used inside > tpm1_do_selftest() fails. Fix the bugs preventing resume from working. Thanks for fixing this, unfortunately I can no longer test the fix as I've got a new laptop since when I was hitting the bug on the older one. Vlastimil > v2: > * Added Jerry's reviewed-by's. > * Rebased to 865fdb08197e ("Merge tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input"). > * Mirrored patches to linux-next. > > Cc: Vlastimil Babka <vbabka@suse.cz> > Cc: Jason A. Donenfeld <Jason@zx2c4.com> > Cc: Jason Gunthorpe <jgg@ziepe.ca> > Cc: Jerry Snitselaar <jsnitsel@redhat.com> > > Link: https://lore.kernel.org/linux-integrity/CS6UJMSTVA4L.FRQ5VL1I1EF4@suppilovahvero/T/#m236d62184229cc035605143fde10933bcde60065 > Jarkko Sakkinen (2): > tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume > tpm: Prevent hwrng from activating during resume > > drivers/char/tpm/tpm-chip.c | 4 +++ > drivers/char/tpm/tpm-interface.c | 10 ++++++++ > drivers/char/tpm/tpm_tis_core.c | 43 ++++++++++++++------------------ > include/linux/tpm.h | 1 + > 4 files changed, 34 insertions(+), 24 deletions(-) >
On Tue May 2, 2023 at 10:37 AM EEST, Vlastimil Babka wrote: > On 5/2/23 03:15, Jarkko Sakkinen wrote: > > During TPM 1.2 resume, the first PCR read operation used inside > > tpm1_do_selftest() fails. Fix the bugs preventing resume from working. > > Thanks for fixing this, unfortunately I can no longer test the fix as I've > got a new laptop since when I was hitting the bug on the older one. I don't think these fixed make things worse, and I could reproduce the bug locally, so I'll put them to my PR :-) BR, Jarkko