linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/1] add sysfs exports for TPM 2 PCR registers
@ 2020-07-22 15:57 James Bottomley
  2020-07-22 15:57 ` [PATCH v3 1/1] tpm: add sysfs exports for all banks of " James Bottomley
  0 siblings, 1 reply; 7+ messages in thread
From: James Bottomley @ 2020-07-22 15:57 UTC (permalink / raw)
  To: linux-integrity; +Cc: Mimi Zohar, Jarkko Sakkinen

v3 corrects the WARN_ON check, adds a commet to tpm_algorithms and
adds Jerry's reviewed-by.

At last year's plumbers conference it was agreed in principle to
export TPM 2 PCRs via sysfs.  We also agreed we should conform to
sysfs rules of one value per file, which rules out the "pcrs" file
format of TPM 1.2 which has every PCR value in the same file.

I added these files using device groups, so one group per bank hash of
the TPM.  Using an emulator which supports a variety of hashes, you
can see the structure of the group files:

root@testdeb:~# ls -F /sys/class/tpm/tpm0/
dev      pcr-sha1/    pcr-sha384/  power/      tpm_version_major
device@  pcr-sha256/  pcr-sha512/  subsystem@  uevent

As a future enhancement, we could use the group is_visible function to
remove files corresponding to PCRs which don't exist.  The reason this
isn't present is that so far I've never seen a TPM with a missing PCR.

James

---

James Bottomley (1):
  tpm: add sysfs exports for all banks of PCR registers

 drivers/char/tpm/tpm-sysfs.c | 178 +++++++++++++++++++++++++++++++++++
 include/linux/tpm.h          |   9 +-
 2 files changed, 186 insertions(+), 1 deletion(-)

-- 
2.26.2


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

end of thread, other threads:[~2020-08-18  5:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 15:57 [PATCH v3 0/1] add sysfs exports for TPM 2 PCR registers James Bottomley
2020-07-22 15:57 ` [PATCH v3 1/1] tpm: add sysfs exports for all banks of " James Bottomley
2020-07-24  6:57   ` Jarkko Sakkinen
2020-07-27  3:25     ` James Bottomley
2020-08-04 11:35       ` Mimi Zohar
2020-08-18  5:38       ` Jarkko Sakkinen
2020-07-27 15:08   ` Thiago Jung Bauermann

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