tpm: Add tpm_buf_read_{u8,u16,u32}
authorJarkko Sakkinen <jarkko@kernel.org>
Mon, 29 Apr 2024 20:27:56 +0000 (16:27 -0400)
committerJarkko Sakkinen <jarkko@kernel.org>
Thu, 9 May 2024 19:30:51 +0000 (22:30 +0300)
commitacd5eb4f50241c5e3c2e0056c0e2151295796416
tree30354fef4cd50489d574cc302a62c85450b2b01e
parentd926ee92e84146ff85877b15d9ac0c7cd7c422c6
tpm: Add tpm_buf_read_{u8,u16,u32}

Declare reader functions for the instances of struct tpm_buf. If the read
goes out of boundary, TPM_BUF_BOUNDARY_ERROR is set, and subsequent read
will do nothing.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm-buf.c
include/linux/tpm.h