Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14954880rwb; Mon, 28 Nov 2022 06:38:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf6N+XTnc/r7mp2pHG1HRfEBu7YYKBh5TK40rC955ZsqU054uLHCrPssRtryNYAn+I9Gqign X-Received: by 2002:a17:907:206f:b0:7bb:cc6b:86d6 with SMTP id qp15-20020a170907206f00b007bbcc6b86d6mr16701222ejb.252.1669646281916; Mon, 28 Nov 2022 06:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669646281; cv=none; d=google.com; s=arc-20160816; b=n4+gjQADiMUm5J5Y2VRT4oWzhH5x3ufPSLoyJlKkFQ9EaWZJE2QOjktf6jLIbRfo75 Z9I/QBbVAzG/U486a7VuRXV15t+X6xfjrssTeGgL50C/O6lHsqiDRGioTM/RjeD+vBPs KQ/O4KnUsLnSrXvRbfsgUf0dxlVKN8VK7QmFBCpoduPWXDxfYJe8opJQg2E4f4mLPvzA R4d1cueqMmfrze+C5Y0CHLry6lPSiMb1gYkh7OfR9+3Q+K86RT0fHNO3rPTregKBSKJ6 vBk4T7H6kLHHvJhEt0S1TRHggniSSIS6y+PZnbrVqyLKMr9b0X/SwTor9GKub9a56h+0 KkyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=TY7/7AgLrq4nTnUbMFstKjsYLVXpbbNEZVUDr1fnyEo=; b=auCp9Ic2VmJMD0fqvIUNRitcQepB/gB3D74xCIYOJyMFWhVG+QkZftluuj9/gL1rYO ZtXY+CSHwR75zAQuEeDh/TZhaQHQxBMIMps4sEQALvd2JEke6LFGauCRvApv5jdc4Qm7 55gc0XM8x2UIJYLMzNTk/pcL1ksQyJmiWNHeAdcTGTj4MhLWpDYKdxb8nFUgFaSJpIoK PieBOy79/KSW+XYIo9VLcY3UfcHKqXl0qzBLu+cOdi0OAXUAPxf+OyZVPsJkEk6TaSQh oaGfK9dDFMPXA0dg4/+cER3AXMy3nvAV60Oyf3MPhF91aoMiQ4IbvjAxhyhNYhr2BPCo TKCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Z64fkzaQ; dkim=neutral (no key) header.i=@suse.cz; 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 z11-20020a509e0b000000b00461c50013b8si9629444ede.192.2022.11.28.06.37.34; Mon, 28 Nov 2022 06:38:01 -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=@suse.cz header.s=susede2_rsa header.b=Z64fkzaQ; dkim=neutral (no key) header.i=@suse.cz; 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 S231675AbiK1NgI (ORCPT + 84 others); Mon, 28 Nov 2022 08:36:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231828AbiK1NgC (ORCPT ); Mon, 28 Nov 2022 08:36:02 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F6461EEE1; Mon, 28 Nov 2022 05:35:56 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 25F571F381; Mon, 28 Nov 2022 13:35:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669642555; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TY7/7AgLrq4nTnUbMFstKjsYLVXpbbNEZVUDr1fnyEo=; b=Z64fkzaQ1NzT1oE7SOTCu/aiWrW21a0pepwxqTitNRD+x3vPFnsCXOQv9k26wu10KW2lst +/+lgGlpWCsEUs+jAWcfJF4cAKBM8fTmYcONmxL6TjMUrlwYrDgsAZDvo2/uhKBpPYxrUH /H7eshMzTlA/MHZQm6/hOXvF+rNmzu4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669642555; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TY7/7AgLrq4nTnUbMFstKjsYLVXpbbNEZVUDr1fnyEo=; b=8PcQ3RitgPSEuNjx/4GFpmHA640HgCeS40CwkL+layZUdqOaa63xV7mTs8j+I/24VfCjm/ II1gZvdj8ywebMCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EFDD413273; Mon, 28 Nov 2022 13:35:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id M/fIOTq5hGOfCQAAMHmgww (envelope-from ); Mon, 28 Nov 2022 13:35:54 +0000 Message-ID: Date: Mon, 28 Nov 2022 14:35:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [REGRESSION] suspend to ram fails in 6.1 due to tpm errors Content-Language: en-US To: "Jason A. Donenfeld" Cc: Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , Jan Dabros , regressions@lists.linux.dev, LKML , linux-integrity@vger.kernel.org, Dominik Brodowski , Herbert Xu , Linus Torvalds References: From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_SOFTFAIL 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 11/28/22 13:03, Jason A. Donenfeld wrote: > Hi Vlastimil, > > Thanks for CC'ing me. > > On Mon, Nov 28, 2022 at 09:15:33AM +0100, Vlastimil Babka wrote: >> Dominik on IRC pointed me to commit b006c439d58d ("hwrng: core - start hwrng >> kthread also for untrusted sources"), which could make sense if the TPM was not >> used at all before and now it's used for randomness. But then it probably "just" >> uncovered a pre-existing issue? Maybe there's a race with getting the randomness >> and suspend? Could it be exactly what this patch is attempting to fix? >> https://lore.kernel.org/all/20221103145450.1409273-2-jsd@semihalf.com/ > > The commit you referenced just turns on some functionality that most > people previously didn't have (but maybe could have, manually). So this > is a case of a new commit unearthing a bug in some old code. We had > something similar happen with a raspi driver and fixed the bug there. Right, I suspected as much. > From the looks of the lore link you provided, it sounds like the same > thing has happened already there to tpm? That this is already fixed by > that commit? I think if you have a system that's readily exhibiting the Well it was a patch series where a v3 was promised with more info about the bug it fixes, but I haven't found a v3. So if the author or TPM maintainers can confirm that it does (or can) indeed fix such a bug I'm observing, I'd hope for it to be fasttracked to 6.1. > issue, the best thing to do would be to try that series, and report > back, maybe even providing your `Tested-by:` line if it works. Yeah, I have compiled rc7 with patch 1/3, without the rest as that didn't seem necessary, and there was some review feedback that some parts need fixing. So far it didn't exhibit the bug when suspending/resuming 10 times, but that's not yet a guarantee due to nondeterministic nature of the issue and usually the suspends weren't happening in such rapid succession... I'll keep using that kernel for now on the laptop, fwiw. > I'll play around and see if I can repro too. Looks like you have a T460? > I don't have exactly that but maybe something close enough. Great, thanks! > Jason