summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2020-07-03 01:55:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-19 08:16:27 +0200
commit1a2e558c8b3084a292f461fb9adca5bb78792ee5 (patch)
treee9dda9b8b58fac1e8ac39e8248e6c339d20c27e8 /include/linux
parent169d55c486f895d05f190775a605d22ca6606a6d (diff)
tpm: Unify the mismatching TPM space buffer sizes
commit 6c4e79d99e6f42b79040f1a33cd4018f5425030b upstream. The size of the buffers for storing context's and sessions can vary from arch to arch as PAGE_SIZE can be anything between 4 kB and 256 kB (the maximum for PPC64). Define a fixed buffer size set to 16 kB. This should be enough for most use with three handles (that is how many we allow at the moment). Parametrize the buffer size while doing this, so that it is easier to revisit this later on if required. Cc: stable@vger.kernel.org Reported-by: Stefan Berger <stefanb@linux.ibm.com> Fixes: 745b361e989a ("tpm: infrastructure for TPM spaces") Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Tested-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tpm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 53c0ea9ec9df..77fdc988c610 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -93,6 +93,7 @@ struct tpm_space {
u8 *context_buf;
u32 session_tbl[3];
u8 *session_buf;
+ u32 buf_size;
};
struct tpm_bios_log {