]> git.baikalelectronics.ru Git - kernel.git/commit
tpm: Unify the mismatching TPM space buffer sizes
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Thu, 2 Jul 2020 22:55:59 +0000 (01:55 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fri, 24 Jul 2020 06:26:23 +0000 (09:26 +0300)
commit26fa886258aa4038eeb2fbc524e12d1fc0d24cfe
tree2837a1dfd03cbcc0d543e46c3531197022ae1b18
parent2e2f16896fbfcef080cb40f28c2e48fbd26d4cca
tpm: Unify the mismatching TPM space buffer sizes

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: ad56a2ed831a ("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>
drivers/char/tpm/tpm-chip.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm2-space.c
drivers/char/tpm/tpmrm-dev.c
include/linux/tpm.h