mbox series

[v2,0/3] tpm: Preserve TPM measurement log across kexec

Message ID 20220616154130.2052541-1-stefanb@linux.ibm.com (mailing list archive)
Headers show
Series tpm: Preserve TPM measurement log across kexec | expand

Message

Stefan Berger June 16, 2022, 3:41 p.m. UTC
The of-tree driver does not currently preserve the IBM vTPM 1.2 and
vTPM 2.0 measurement logs across a kexec. This series fixes this for the
kexec_file_load() syscall using the flattened device tree (fdt) to
carry the measurement log's buffer across kexec.

   Stefan

v2:
 - rearranged patches
 - fixed compilation issues for x86

Stefan Berger (3):
  tpm: of: Move of-tree specific code from tpm driver into of driver
  of: kexec: Refactor IMA buffer related functions to make them reusable
  tpm/kexec: Duplicate TPM measurement log in of-tree for kexec

 drivers/char/tpm/eventlog/of.c |  31 +---
 drivers/of/Makefile            |   2 +-
 drivers/of/device_node.c       |  27 +++
 drivers/of/kexec.c             | 293 +++++++++++++++++++++++++++++----
 include/linux/kexec.h          |   6 +
 include/linux/of.h             |   8 +-
 include/linux/of_device_node.h |   9 +
 kernel/kexec_file.c            |   6 +
 8 files changed, 318 insertions(+), 64 deletions(-)
 create mode 100644 drivers/of/device_node.c
 create mode 100644 include/linux/of_device_node.h

Comments

Rob Herring June 27, 2022, 10:33 p.m. UTC | #1
On Thu, Jun 16, 2022 at 11:41:27AM -0400, Stefan Berger wrote:
> The of-tree driver does not currently preserve the IBM vTPM 1.2 and
> vTPM 2.0 measurement logs across a kexec. This series fixes this for the
> kexec_file_load() syscall using the flattened device tree (fdt) to
> carry the measurement log's buffer across kexec.

As mentioned in v1, please Cc other folks that might care about TPMs 
and kexec. I'm sure it's not only IBM.

Rob
Stefan Berger June 28, 2022, 12:45 p.m. UTC | #2
On 6/27/22 18:33, Rob Herring wrote:
> On Thu, Jun 16, 2022 at 11:41:27AM -0400, Stefan Berger wrote:
>> The of-tree driver does not currently preserve the IBM vTPM 1.2 and
>> vTPM 2.0 measurement logs across a kexec. This series fixes this for the
>> kexec_file_load() syscall using the flattened device tree (fdt) to
>> carry the measurement log's buffer across kexec.
> 
> As mentioned in v1, please Cc other folks that might care about TPMs
> and kexec. I'm sure it's not only IBM.

That's why I cc'ed the linux-integrity mailing list now where all the 
TPM related development is happening.

    Stefan

> 
> Rob