Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3144696rwb; Mon, 16 Jan 2023 04:26:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXtAPtvc2I4FMT1DyOxfR7N4iVV/EFRNUYh+9D++dqziA1RAud9LepLPrBl9dahcWdBbSLWq X-Received: by 2002:aa7:9d92:0:b0:58a:aaa3:f72e with SMTP id f18-20020aa79d92000000b0058aaaa3f72emr20708555pfq.6.1673871973278; Mon, 16 Jan 2023 04:26:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673871973; cv=none; d=google.com; s=arc-20160816; b=vZzX75ekTqilvcgqx7p+okfPpyvoiphcVAn0WJ7oWjQ/wBGoMjZgWauWYt96nGNvBJ J9EWJMDlNpUfZ47dDFM+LapbFKPndzKNjWDJGjH/ucKzmzdNLjx79Sr49RXzPoUMbNZU KOGThlJZlJSO4hCQqLVux3pMn/ZyftBKRGiGRm272yy2Xcz/ntd1Ig7qE6OSf8aJhB4i GlOF7mU9GV99ofugmX/2yVaatep083kVgAZET23LD5aI5YbrWmQ8MbIVWFymUKcwxObj //Us1igXhDCBsZNAE7GUFjEJF5kQ48r6FwX4g+JlWaLXd5aUuEoy+GRhIaOUoX62e2pT TfIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DUphJzxM60IuJNTVgMDVJZpEI5dN5mX4BaR72R0x4zk=; b=ZkOzav/1CJ6DSJ5qLqSLJFRzoF7PizRYQCjjixtsynPj+UPEc8/fN9N5HXa0XPVU13 19MPTXGWxMZKx6QsJ6UCszyuxZFuDQK1QkT1J9G7JtD8IvOiO0oT1boondqpIlasbZ+y tnP7b50FgqmoIjtoeJMD+++R6yHu/B0HVWeTHd+OJ4aIV/AwnEMAbPLRtTgyhiXCpjsX cJM23qcY/rzKzd6KZxlt9/vOlgocXm38pwKmMttAvSXTeLTq3tzZyWmY/vrMLZpAN+P5 pwEE45gBBKfcAwok8ZOAO6kR6jhdBXcgX2aLFYnDnkroBPUfPX0tHccePvE+O0iVX+c8 nysw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nKC7eLSl; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t31-20020a056a00139f00b0056e4c95266bsi7701839pfg.77.2023.01.16.04.26.07; Mon, 16 Jan 2023 04:26:13 -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=@kernel.org header.s=k20201202 header.b=nKC7eLSl; 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 S229986AbjAPLat (ORCPT + 51 others); Mon, 16 Jan 2023 06:30:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbjAPLaV (ORCPT ); Mon, 16 Jan 2023 06:30:21 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 189C71F491; Mon, 16 Jan 2023 03:30:17 -0800 (PST) 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 A8CCE60F6B; Mon, 16 Jan 2023 11:30:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86CA1C433EF; Mon, 16 Jan 2023 11:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673868616; bh=zjZm8nnM5icpWS5Ktv9fM9x6p9DiE34nQjN7zca0moA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nKC7eLSlL5MNAYfdrSHyIIDCU7XQTT4Lyubt4jDqV/NY7qts5gf1oRml73MXnwBmW b8pV3NH25CHAswaeiog+vj0B891k0d31eakMRzPMLn6lXr8Z42XnP7NCvENKgBQOTi htx1sT55pht6TpNvuBFe0sByLxwX2BfIQ2ZN6xv8m6pJ8iYz7MvNrvJlWAaAveOGMd f3WWdDyU1337rta4RJ2jzRentFGgcbJ5A/S14hR2CHbX08mvWGMYVwgg+7Hft7kJL5 aC0nzVl3aYRwIJbb6vWquTHpCRnAxSvKtHVof4IENyEn31AeTYgDXcvSeYQI6in+eI sCJs+UQ3BCebw== Date: Mon, 16 Jan 2023 13:30:11 +0200 From: Jarkko Sakkinen To: Vlastimil Babka Cc: Peter Huewe , Jason Gunthorpe , Jan Dabros , regressions@lists.linux.dev, LKML , linux-integrity@vger.kernel.org, Dominik Brodowski , "Jason A. Donenfeld" , Herbert Xu , Linus Torvalds Subject: Re: [REGRESSION] suspend to ram fails in 6.2-rc1 due to tpm errors Message-ID: References: <7cbe96cf-e0b5-ba63-d1b4-f63d2e826efa@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7cbe96cf-e0b5-ba63-d1b4-f63d2e826efa@suse.cz> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Wed, Dec 28, 2022 at 09:22:56PM +0100, Vlastimil Babka wrote: > Ugh, while the problem [1] was fixed in 6.1, it's now happening again on > the T460 with 6.2-rc1. Except I didn't see any oops message or > "tpm_try_transmit" error this time. The first indication of a problem is > this during a resume from suspend to ram: > > tpm tpm0: A TPM error (28) occurred continue selftest This failure occurs in tpm_tis_resume(). tpm1_do_selftest() is called for the first time during a power cycle in tpm_chip_register(), which does not spawn anything klog, does it? Because they wrap the call differently tpm_tis_resume() does not disable clkrun protocol, which is at least obvious semantical difference. I'd suggest to workaround the bug by replacing tpm1_do_selftest() with 1. tpm_chip_start() 2. tpm1_auto_startup() 3. tpm_chip_stop() tpm1_auto_startup() has already convergent rollback semantics as in https://lore.kernel.org/lkml/20230105144742.3219571-1-Jason@zx2c4.com/ To add, even without bug, it makes a lot of commons to make semantics convergent. BR, Jarkko