linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Add support for TPM event log 2.0 on EFI/ARM
@ 2019-02-11 14:30 bsz
  2019-02-11 14:30 ` [PATCH 1/5] tpm: Copy calc_tpm2_event_size() to TPM library bsz
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: bsz @ 2019-02-11 14:30 UTC (permalink / raw)
  To: linux-efi, linux-integrity, linux-kernel, peterhuewe,
	jarkko.sakkinen, ard.biesheuvel
  Cc: tweek, mingo, hdegoede, leif.lindholm, mw, Bartosz Szczepanek

From: Bartosz Szczepanek <bsz@semihalf.com>

These few patches introduce support for retrieving TPM event log in 2.0
format from EFI structures. Since 2.0 format involves dynamically-sized
records, some more computation is needed. Function responsible for this
has already been in kernel (calc_tpm2_event_size) - it was moved to
library, so it can be used from both EFI stub and device drivers.
Signature is slightly altered, as explained in one of the commits.

EFI stub was enhanced to call EFI GetEventLog function asking for 2.0
event log. If found, it's installed in configuration table similarily
to TPM 1.2 log. In case 2.0 log is not available, it falls back to 1.2
log.

Call to efi_retrieve_tpm2_eventlog() is added at ARM efi_entry to enable
TPM functionality on ARM / ARM64 platforms.

It was tested on two platforms - ARM64 and x86_64, both EFI-based and
equipped with TPM 2.0 module.

Bartosz Szczepanek (5):
  tpm: Copy calc_tpm2_event_size() to TPM library
  tpm: Change calc_tpm2_event_size signature
  tpm: Use library version of calc_tpm2_event_size in sysfs code
  efi/libstub/tpm: Retrieve TPM event log in 2.0 format
  efi/arm: Retrieve TPM event log at efi_entry

 drivers/char/tpm/eventlog/tpm2.c        |  89 +++++---------------------
 drivers/firmware/efi/libstub/Makefile   |   3 +-
 drivers/firmware/efi/libstub/arm-stub.c |   1 +
 drivers/firmware/efi/libstub/tpm.c      | 107 +++++++++++++++++++++++++++++++-
 include/linux/tpm_eventlog.h            |   3 +
 lib/Makefile                            |   2 +
 lib/tpm.c                               |  78 +++++++++++++++++++++++
 7 files changed, 208 insertions(+), 75 deletions(-)
 create mode 100644 lib/tpm.c

-- 
2.14.4


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-02-13 14:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 14:30 [PATCH 0/5] Add support for TPM event log 2.0 on EFI/ARM bsz
2019-02-11 14:30 ` [PATCH 1/5] tpm: Copy calc_tpm2_event_size() to TPM library bsz
2019-02-13 11:14   ` Jarkko Sakkinen
2019-02-13 11:18     ` Jarkko Sakkinen
2019-02-11 14:30 ` [PATCH 2/5] tpm: Change calc_tpm2_event_size signature bsz
2019-02-13 11:20   ` Jarkko Sakkinen
2019-02-11 14:30 ` [PATCH 3/5] tpm: Use library version of calc_tpm2_event_size in sysfs code bsz
2019-02-13 11:22   ` Jarkko Sakkinen
2019-02-11 14:30 ` [PATCH 4/5] efi/libstub/tpm: Retrieve TPM event log in 2.0 format bsz
2019-02-13 11:26   ` Jarkko Sakkinen
2019-02-13 14:21     ` Bartosz Szczepanek
2019-02-13 14:22       ` Ard Biesheuvel
2019-02-11 14:30 ` [PATCH 5/5] efi/arm: Retrieve TPM event log at efi_entry bsz

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).