Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1112931rwb; Tue, 4 Oct 2022 15:53:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Jgd5xuOG7UrNBjkGzofj1aekxvdLE6FMeBd66NZjmjLmtFBHvUXzz+uIxbY2/JGT2CW7E X-Received: by 2002:a17:906:7952:b0:78d:1969:e8a9 with SMTP id l18-20020a170906795200b0078d1969e8a9mr4220896ejo.705.1664923992377; Tue, 04 Oct 2022 15:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664923992; cv=none; d=google.com; s=arc-20160816; b=Fk2jVUdKFALh/ptmexOMd1xhIuzZnow0t6O2lvICV6NhhVkD703wkWTb7kSlx8dKsl sgOY4ThXjLxok1bTRahk+PyxdM+2i/oDnBlEwzA72L5/wgE8PO49GkfQytJVYbE6GKL8 Iq3d9jr4WYmRjqGEHHivAT0+0+675H7bDhVElrycL2mCmLdaB8sZNdIawI3osz+oEGV/ KMBJNT6XK6R+gOo+6W5aQhzeWusm3cs5nAwAI3fSe40DcxW5iWLznd7NCgjv5NsC85uA VAPnawmKkegWVS0rNy0CwYSHa/P3tYzcCcDrzMP/LPXvGrfR30erlkrjS6+OmbTUitkI 3tUA== 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=8ZxOjvVHNYeXuVNy/GwdooX3AVx31c8lPLMg4k/4dG8=; b=OLsdvMzL9bWuzMmeBTDR2gtnCdXEE5gStAFzCREx6XN88afJintS3xehyIBaeUVAiH Xdz9YeVP/VteEjG/VVn2T5VaetSLcreeWLGfJf2UIel8Wk+8dx0sRR7mq+iW0loNYYLQ C7wjGhGn5GmtKVbi9ZapZ1Msts7ryZryDl4acZquglY4ozaKPDG8J3GwZPdtNiCarLUs Xx2coPwWhznltOJFyrFM+BBdmHRKTfQfpzilEco4O0GwmHKaC4Uv0kwwxyY361e9e4ql RkCFbzTUzZYwu6ME4v1MYN7A+iUvnihUTJ/+XMeqH3+HR21j6jz3JExp8EYLAf3d+Mme qXgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L353apU/"; 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 cw3-20020a170906478300b0076f077cec04si10715407ejc.365.2022.10.04.15.52.47; Tue, 04 Oct 2022 15:53:12 -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="L353apU/"; 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 S230128AbiJDWkS (ORCPT + 99 others); Tue, 4 Oct 2022 18:40:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbiJDWkQ (ORCPT ); Tue, 4 Oct 2022 18:40:16 -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 A0C8F178B8; Tue, 4 Oct 2022 15:40:14 -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 1D3576154C; Tue, 4 Oct 2022 22:40:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18DEEC433C1; Tue, 4 Oct 2022 22:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664923213; bh=TXHtvV5ZQ2yOBrkGMupsXGD6dQvin7zUfarcovd376o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L353apU/nFR1/ERWRCpu0dvvqc1yvNaUh5SsUtR7MI6HCMeJn4zlANB5G/x9RJU1H vLtHq6LfQZui8FjDf2wJtYBVmZWTBtAnzEGhOnGV0Cg3PFixK/OsuuFFwlQPvLwqP4 PQdFemZ337m4iNEELiul/hb2Ypde86yxy9ipVehuS0xGn+feXHxxr7fjjXYHpzk/7B +SWRiDa3OtDe/a907sHotDhswtlLDgYw47jbELPtcburoiEysfRFm0XHe30mIh6YNU t/6LFjk5TwwEQmw5v1Oc97OQ1VjSKA7/JZ7kVTHSg5ex7TuTB1ywS+Re5nnZsrqiq5 6012klPD/Ubjw== Date: Wed, 5 Oct 2022 01:40:09 +0300 From: Jarkko Sakkinen To: Morten Linderud Cc: Peter Huewe , Jason Gunthorpe , Stefan Berger , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Oleksandr Natalenko Subject: Re: [PATCH] tpm/eventlog: Don't abort tpm_read_log on faulty ACPI config Message-ID: References: <20210920203447.4124005-1-morten@linderud.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210920203447.4124005-1-morten@linderud.pw> 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 Mon, Sep 20, 2021 at 10:34:47PM +0200, Morten Linderud wrote: > Some vendors report faulty values in the acpi TPM2 table. This causes s/acpi/ACPI/ > the function to abort with EIO and essentially short circuits the s/the function/tpm_read_log()/ > tpm_read_log function as we never even attempt to read the EFI > configuration table for a log. > > This changes the condition to only look for a positive return value, > else hands over the eventlog discovery to the EFI configuration table > which should hopefully work better. Please, write in imperative ("Change..."). Also exlicitly state how are you changing the check for tpm_read_log_acpi() in tpm_read_log(). You could *even* have a snippet how the checks change here for clarity. > It's unclear to me if there is a better solution to this then just > failing. However, I do not see any clear reason why we can't properly > fallback to the EFI configuration table. This paragraph should not be part of the commit message. Rest of the commit message made sense can you add also fixes tag as this is clearly a bug fix? Also, please remove the two spurious diff's from the commit that are not relevant for a stable bug fix (pr_warn() and comment removal). BR, Jarkko