From patchwork Wed Apr 26 17:29:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Sakkinen X-Patchwork-Id: 8690 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp421593vqo; Wed, 26 Apr 2023 11:06:08 -0700 (PDT) X-Google-Smtp-Source: AKy350aznWXgo7asvoyC4BoxMyH4G8oIr/vE8Ua8UItFT8axhjUnLcmYfgY+DRO5Hr0e/WdJNkkn X-Received: by 2002:a05:6a20:394a:b0:f2:535d:9a4f with SMTP id r10-20020a056a20394a00b000f2535d9a4fmr17688981pzg.33.1682532368038; Wed, 26 Apr 2023 11:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682532368; cv=none; d=google.com; s=arc-20160816; b=McCBkoalEav22/AKal4unmsUXRXZBkjidNKBjkaqua/URZgQOVadYwbzyJku9ab3GX blfoegql+YDzfPdp7IF0ivp16+2NghFG/AG3q4coyjWuwVfM9FjYYWQZaYgohaGZj0eu yA4/fLDqwUNTnM9EQmS+2H8Vj/eKQiwvWZZZortQKQXbH0xgQvA6iB4x19pq+RJ9PQ53 Ec6Cw+xshrGIwDmZBNgh9HQ4IgWjVafp5jOWe8Du0rntdxd8gJJbO04hYfH4H1It1mGM aV4L92ayQp1vaKlbsxeG8wJpBA/O6j4OvB591sX+nUmvBVyyAOoecOjpF8eVB2BIAhfF T39A== 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=nH5ufmHgb+M9x2KqG6MnBf2yn4k1u50BVQlmKFnL6yQ=; b=fGWsD8jYw4LVzr86X7DaMPxmykybrgpk2O5Z3+QsE5Uadspw2hPZGz7kFWTbHIM0sm +fYiYqnDJpdgpQ7vHos0rh3ekEvadGH8Z6DI0i99Gl+RE+eveUpXrUtL3VgSLeKkp5/C ebhca+5AD0+MpNRz68jz97/8tDunHR/tQBuyQm2cdP3+o8a/QkrW4HT93vd6o8MlkurM AHXA7XVngiWqms0jFXJlTr6e7GisdkEc8XJI4MhxZyl/GfUkKpPpBDKf6LRYGlovXWxY 5UvTT3NkGq3HOlnYoQMqAE5yLzHv0E/vFxm71jLCPH1eRbCGsJbIkZvT5PfPYtoW19o6 9amA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rHwy80VQ; 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 a63-20020a639042000000b0051f8b655e04si16879464pge.505.2023.04.26.11.05.39; Wed, 26 Apr 2023 11:06:08 -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=rHwy80VQ; 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 S234693AbjDZR3h (ORCPT + 99 others); Wed, 26 Apr 2023 13:29:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233678AbjDZR3f (ORCPT ); Wed, 26 Apr 2023 13:29:35 -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 6E02297; Wed, 26 Apr 2023 10:29:34 -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 09856619AC; Wed, 26 Apr 2023 17:29:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 164CCC433D2; Wed, 26 Apr 2023 17:29:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682530173; bh=w8SYslP+/DStWDE54MP5doZAdDsFjd/+Zv+AvTntQFw=; h=From:To:Cc:Subject:Date:From; b=rHwy80VQ/cFqPHrP1jkL+HCXnuOA8qamz5CwdsYIHl7cEdIFR6rGrNIfVnOXDcWkM CpoH+7y84wAqrhW43Hh3vhRgQGpbSmzFnj896/3AUvBz+TwVFCKr03WOXD4QKX598A Xr/L2zbbLOS/DDYaq5qswK8lqnWL7r7+vO/T4v4zfQfCAjAKjVvqTQS75jhFs1dsI6 Vr1A8bcLDJGwbcqQqhZVcuzqG4HcW0+6bk+t6hKLbkKpD4RKTi1zvlTIA+sxvyjBCZ nU+pNdIKYjNf9DW1kt9I26dsNKhkT1ZAWCUa8gRkM5xdSYpjGOb5IdblSzGZKTjaa+ /aBcD9YmsocJw== From: Jarkko Sakkinen To: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jarkko Sakkinen , Vlastimil Babka , "Jason A . Donenfeld" , Jason Gunthorpe Subject: [PATCH 0/2] Fix TPM 1.2 resume Date: Wed, 26 Apr 2023 20:29:26 +0300 Message-Id: <20230426172928.3963287-1-jarkko@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764263060572191831?= X-GMAIL-MSGID: =?utf-8?q?1764263060572191831?= During TPM 1.2 resume, the first PCR read operation used inside tpm1_do_selftest() fails. Fix two bugs that can prevent the operation from working. Cc: Vlastimil Babka Cc: Jason A. Donenfeld Cc: Jason Gunthorpe 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 | 13 +++++----- 4 files changed, 40 insertions(+), 30 deletions(-)