kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nageswara R Sastry <nasastry@in.ibm.com>
To: Stefan Berger <stefanb@linux.ibm.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Cc: "nayna@linux.ibm.com" <nayna@linux.ibm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Eric Biederman <ebiederm@xmission.com>
Subject: Re: [PATCH 2/3] tpm/kexec: Duplicate TPM measurement log in of-tree for kexec
Date: Tue, 14 Jun 2022 16:46:38 +0000	[thread overview]
Message-ID: <MWHPR15MB1150C0B62285E3F7A1C5B736EBAA9@MWHPR15MB1150.namprd15.prod.outlook.com> (raw)
In-Reply-To: <20220614161258.1741427-3-stefanb@linux.ibm.com>


> The memory area of the TPM measurement log is currently not properly
> duplicated for carrying it across kexec when an Open Firmware
> Devicetree is used. Therefore, the contents of the log get corrupted.
> Fix this for the kexec_file_load() syscall by allocating a buffer and
> copying the contents of the existing log into it. The new buffer is
> preserved across the kexec and a pointer to it is available when the new
> kernel is started. To achieve this, store the allocated buffer's address
> in the flattened device tree (fdt) under the name linux,tpm-kexec-buffer
> and search for this entry early in the kernel startup before the TPM
> subsystem starts up. Adjust the pointer in the of-tree stored under
> linux,sml-base to point to this buffer holding the preserved log. The
> TPM driver can then read the base address from this entry when making
> the log available.

> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
...
> -- 
> 2.35.1

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2022-06-14 16:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 16:12 [PATCH 0/3] tpm: Preserve TPM measurement log across kexec Stefan Berger
2022-06-14 16:12 ` [PATCH 1/3] of: kexec: Refactor IMA buffer related functions to make them reusable Stefan Berger
2022-06-14 16:35   ` Nageswara R Sastry
2022-06-14 16:12 ` [PATCH 2/3] tpm/kexec: Duplicate TPM measurement log in of-tree for kexec Stefan Berger
2022-06-14 16:46   ` Nageswara R Sastry [this message]
2022-06-14 17:48   ` Rob Herring
2022-06-15 13:08     ` Stefan Berger
2022-06-15 20:14       ` Rob Herring
2022-06-15 21:45         ` Stefan Berger
2022-06-15 20:18     ` Rob Herring
2022-06-14 18:58   ` kernel test robot
2022-06-15  0:54   ` kernel test robot
2022-06-15  9:42   ` kernel test robot
2022-06-14 16:12 ` [PATCH 3/3] tpm: of: Call of_tpm_get_sml_parameters() to get base and size of log Stefan Berger
2022-06-14 16:47   ` Nageswara R Sastry
2022-06-15 21:25   ` Jarkko Sakkinen

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=MWHPR15MB1150C0B62285E3F7A1C5B736EBAA9@MWHPR15MB1150.namprd15.prod.outlook.com \
    --to=nasastry@in.ibm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ebiederm@xmission.com \
    --cc=frowand.list@gmail.com \
    --cc=kexec@lists.infradead.org \
    --cc=nayna@linux.ibm.com \
    --cc=robh+dt@kernel.org \
    --cc=stefanb@linux.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).