From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org,
linux-security-module@vger.kernel.org,
Stefan Berger <stefanb@linux.ibm.com>
Subject: Re: [PATCH v8 2/2] tpm: Add support for event log pointer found in TPM2 ACPI table
Date: Thu, 2 Jul 2020 23:44:11 +0300 [thread overview]
Message-ID: <20200702204411.GB31291@linux.intel.com> (raw)
In-Reply-To: <20200626153948.2059251-3-stefanb@linux.vnet.ibm.com>
On Fri, Jun 26, 2020 at 11:39:48AM -0400, Stefan Berger wrote:
> From: Stefan Berger <stefanb@linux.ibm.com>
>
> In case a TPM2 is attached, search for a TPM2 ACPI table when trying
> to get the event log from ACPI. If one is found, use it to get the
> start and length of the log area. This allows non-UEFI systems, such
> as SeaBIOS, to pass an event log when using a TPM2.
>
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> ---
> drivers/char/tpm/eventlog/acpi.c | 63 +++++++++++++++++++++-----------
> 1 file changed, 42 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/char/tpm/eventlog/acpi.c b/drivers/char/tpm/eventlog/acpi.c
> index 63ada5e53f13..51312c460335 100644
> --- a/drivers/char/tpm/eventlog/acpi.c
> +++ b/drivers/char/tpm/eventlog/acpi.c
> @@ -49,9 +49,9 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
> void __iomem *virt;
> u64 len, start;
> struct tpm_bios_log *log;
> -
> - if (chip->flags & TPM_CHIP_FLAG_TPM2)
> - return -ENODEV;
> + struct acpi_table_tpm2 *tbl;
> + struct acpi_tpm2_phy *t2phy;
This is a rather cryptic variable name. Should be either 'phy' or
'tpm2_phy' (I don't care that much which one). Did not spot this
earlier.
/Jarkko
prev parent reply other threads:[~2020-07-02 20:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 15:39 [PATCH v8 0/2] tpm2: Make TPM2 logs accessible for non-UEFI firmware Stefan Berger
2020-06-26 15:39 ` [PATCH v8 1/2] acpi: Extend TPM2 ACPI table with missing log fields Stefan Berger
2020-06-26 15:39 ` [PATCH v8 2/2] tpm: Add support for event log pointer found in TPM2 ACPI table Stefan Berger
2020-07-02 20:44 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200702204411.GB31291@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=stefanb@linux.ibm.com \
--cc=stefanb@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).