Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3027273pxb; Tue, 21 Sep 2021 12:51:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylbVtQ9Rpq7WSPKbz1N2hGoRSH5NaZJDKGVIA3dBDdh7VNuR6KUUM0n/ylGTpuqFXfbtJw X-Received: by 2002:a6b:5a0c:: with SMTP id o12mr1500734iob.140.1632253896319; Tue, 21 Sep 2021 12:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632253896; cv=none; d=google.com; s=arc-20160816; b=AOJYNirXa1QQGS8mM1nBug9neAu1LnVjbKqDeXXOrkmWDNlFxqIv11bQ2tS4QP4cp2 CtF4u/VX09d0wk09xX/yzTzXsiusckdW+eR4ge6wTiqLeY9ifub8PLoS3qug47ade2dF 0MPKWbkMLi3oNb5J7bnX5DgEWcA4oB7sQoBoIxztDTnctyhm4Kl8fXN7oV3mJAK8LP7V 186H++NhafKIHX6hzNyIfujTWg/TybgRdN4TdPaUWkx+kv27eQe4/HM7J64ay0nQBRaZ aXKDGHetqd9mypA4Bu4saTIH+Li+KojxUGC0G7wpFu6eGaL5jGvY71vxZY5tW0MbTAT7 OjVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=oc/f52nlc2DdkyCoKdR2ism0dRz5L3KWM4w49adqRl4=; b=uisOPL6ynNdaBgIS4zRTY3JkNGv7zGvkRzM7omRri7DQAYycC3PbKKPcTa3c4Erfty Wxq5akvsthFnAngLLNtk74X0yHHX3zuDERn/NqZf7dBvIyNAmjOSSyS0iQofaUBs46aL 9TEf3lxAP+ewayfSSeUbbNHoB7yBcelE7V9hZ4k23dbON22JQFudGyiGxudjkKL60BqI 79e7BLNj44zHXoS1Z54mJaeB2TQSfy9OpsBWRSGge2KoWr7tLYo7HgWAlrFjvf6a2VqL QLmhnN5d2iTOuhtq2cPaa5tDt359edbuR1oboXamZW0FiV6FDCMqe01B2bkRrpl50yOK Rc8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nMZEX1CV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si17805538ile.52.2021.09.21.12.51.24; Tue, 21 Sep 2021 12:51:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nMZEX1CV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233842AbhIUS7n (ORCPT + 99 others); Tue, 21 Sep 2021 14:59:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:56876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232481AbhIUS7n (ORCPT ); Tue, 21 Sep 2021 14:59:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BE31160FDA; Tue, 21 Sep 2021 18:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632250694; bh=oc/f52nlc2DdkyCoKdR2ism0dRz5L3KWM4w49adqRl4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=nMZEX1CVFJfjIK0ovN54aVJ35VQeQsjCgo8+HMst+nW5rf+k/PpAEzjW11AV6ck+A YsDarfb9FWOuDxuWYOYqpP22wLIlzmCEqJDCncdtLNGaMZbXsh5QcdJ/nhPppXG16w LBguKDQVRIjKytuvLNPfCCfKLO9BkWdunnh2woR7jp8z1rAB1SDQlfavb/aFcvgRR/ NnhaEoZAL7fMI6c/Iupp2eFZosI7U9YaABrhltyiArChIOuMMBoXjwevWD9XmKK2V9 N8TNdAKOpZ/PeYlRLxJMLAcgV+1tPOj2fXp6tcT0BXIhndvKeOQJhz8b04LlFgg1p0 /Kzt4V6ULuFGQ== Message-ID: <896a0773cac953ae2f35ba08af65a598aa71942d.camel@kernel.org> Subject: Re: [PATCH] tpm/eventlog: Don't abort tpm_read_log on faulty ACPI config From: Jarkko Sakkinen To: Morten Linderud , Peter Huewe , Jason Gunthorpe Cc: Stefan Berger , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Oleksandr Natalenko Date: Tue, 21 Sep 2021 21:58:11 +0300 In-Reply-To: <20210920203447.4124005-1-morten@linderud.pw> References: <20210920203447.4124005-1-morten@linderud.pw> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-09-20 at 22:34 +0200, Morten Linderud wrote: > Some vendors report faulty values in the acpi TPM2 table. This causes Nit: ACPI (not acpi) > the function to abort with EIO and essentially short circuits the > tpm_read_log function as we never even attempt to read the EFI > configuration table for a log. Nit: tpm_read_log() > This changes the condition to only look for a positive return value, > else hands over the eventlog discovery to the EFI configuration table "hands over" -> "fallback" > which should hopefully work better. Please write in imperative form, e.g. "Change...", or perhaps in this case "Look...".=20 Hopes are somewhat irrelevant, in the context of a commit message. > 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. Neither hopes nor doubts help us :-) Because the commit message did not discuss any of the code changes that were done it is very hard to say much anything of this yet. There's also one corner case that was not discussed in the commit message. The historical reason for not using TPM2 file is that old TPM2's did not have that feature. You have to ensure that legacy hardware does not break. /Jarkko