Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2693595rwl; Fri, 6 Jan 2023 09:41:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXtWtJFqjpSPp2UceOr41o7flrQeWIixLf7PoyGPQELPEJ2YmPFLHNsXaSdpiWqwmHaRGEuq X-Received: by 2002:a17:907:d302:b0:7c1:3472:5e75 with SMTP id vg2-20020a170907d30200b007c134725e75mr51127379ejc.29.1673026919719; Fri, 06 Jan 2023 09:41:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673026919; cv=none; d=google.com; s=arc-20160816; b=Q/1mk9mC4XcJaT4QxoYUUfE+4DjKyTdyggMwZ7dFTrDkJvGIZAbyWPqpY8x489R+Zv b0OJ/KYtLB2b7cvJFeDmOfQSL/A9NcqNs0RkNrsKewGMHtD3o4ff+4nORFB3c9SGUTRb Z0vih66t/zKtuQTzsUkau/VUvN0hd7o5/8jUMCpp0ww0SQfxrKgjFAZKjpp4VXLNbNLE fAYZDuVHaZQ3Yghn7txZPsJVTNdAi0lo4gGy8+q9o3O8F3TWSYRH23rOm4SZawrEQ9JH 4XfMYV2rm9zGRGiuC+tFrl3rm+VMUVYs3qb3IYqbdDAaDusaNeHpHV9K3M/IrtzhP/ss 4bfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=13qVFvzj+JoRi8+CvI6HYB6uSTn1bytbuVR6Q3H6GEE=; b=iAXFs2FGQYr/VS659P/Q6CacRBCoxkrM8pGlySlyeLippDw6qIpkYKkjuf9Er+cyrt wJXoLpaRGlFvTboMYrlJNbzx6pvHagfv34+LzzHjzYFKOkAdYMZcBmJSongyA0ACr2D5 9bXpDRFiFj9PaOnKzoSkhmqfT2VYyWsnWv0wuITykGEAJFs+A5giMf5DXtsHWcZlfXK8 8ubNU+Oz5Y2d1PQZQmBoYxTJdMGchX5zr5WjraDGz+bjNBpt960tXAqQ5ateJmOL03IM Q5wSS1OJkdr7cQ9dge/ldbfmC259YokKRXu1cYyI7jLr1qVygZWq//uioOljCulG00mg 9q4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=gjort3rq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cx19-20020a05640222b300b00494cb3beb5bsi1996909edb.180.2023.01.06.09.41.47; Fri, 06 Jan 2023 09:41:59 -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=@zx2c4.com header.s=20210105 header.b=gjort3rq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233994AbjAFRRF (ORCPT + 54 others); Fri, 6 Jan 2023 12:17:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbjAFRQv (ORCPT ); Fri, 6 Jan 2023 12:16:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A62E7D1E4; Fri, 6 Jan 2023 09:16:39 -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 D24B6616F5; Fri, 6 Jan 2023 17:16:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6F67C433D2; Fri, 6 Jan 2023 17:16:37 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="gjort3rq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1673025394; h=from:from:reply-to:subject:subject: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=13qVFvzj+JoRi8+CvI6HYB6uSTn1bytbuVR6Q3H6GEE=; b=gjort3rqIxDFFSGMUL9g9t+pqxS2//Zx7rkx+zku1tA6P4s8RntIG8YRn7KXe7ivEpzJHn zoh2J5sHguhfXCw8ss9r6PyzWE60yUD6tpziYgDl1BDFZY1QAR7MrDP8p67ltchwloJp/N wP+bU8MM3voRLDUdQfONxFQRlCCWWfs= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 7be4b881 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 6 Jan 2023 17:16:33 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id c34so3163163edf.0; Fri, 06 Jan 2023 09:16:33 -0800 (PST) X-Gm-Message-State: AFqh2kpkWdw3IX0G1uTlagvLAoZrmwujK9888TurxozTUPmu2xZiVnq7 Ve3AqgkJpp/CfXPUUohcegpBUXbfhXP3SGfJZiw= X-Received: by 2002:aa7:cb13:0:b0:48e:ae51:464d with SMTP id s19-20020aa7cb13000000b0048eae51464dmr1649004edt.341.1673025391232; Fri, 06 Jan 2023 09:16:31 -0800 (PST) MIME-Version: 1.0 References: <20230106030156.3258307-1-Jason@zx2c4.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 6 Jan 2023 18:16:19 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] tpm: Allow system suspend to continue when TPM suspend fails To: Luigi Semenzato Cc: Thorsten Leemhuis , James Bottomley , Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , Jan Dabros , regressions@lists.linux.dev, LKML , linux-integrity@vger.kernel.org, Dominik Brodowski , Herbert Xu , Johannes Altmanninger , stable@vger.kernel.org, Linus Torvalds , Vlastimil Babka , tbroch@chromium.org, dbasehore@chromium.org, keescook@chromium.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 Fri, Jan 6, 2023 at 6:04 PM Luigi Semenzato wro= te: > > I worked a fair amount on TPM 1.0 about 10 years ago and I even vaguely r= emember suspend-related problems. I'd be happy to take a look. The linked= thread shows that Peter Huewe was copied. I know Peter well, his opinion = can be trusted. Unfortunately I don't immediately see a link to a patch, c= an you help? Sorry, I should have included that: https://lore.kernel.org/lkml/20230106030156.3258307-1-Jason@zx2c4.com/ Instead of blocking system suspend when TPM_ORD_SAVESTATE fails, it just lets the system sleep anyway. This means that presumably the system might sleep without having called TPM_ORD_SAVESTATE. Trying to figure out how bad that is. And yes, Peter Huewe certainly knows about TPMs, especially as he maintains the code in Linux, but the maintainers haven't been so much available, unfortunately. This bug happens to intersect with something mostly related that I work on (the rng), so I'm motivated to at least prevent the worst of the breakage, but I otherwise don't know anything about the Linux TPM driver. Jason