]> git.baikalelectronics.ru Git - kernel.git/commit
security: keys: trusted: fix lost handle flush
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Dec 2019 17:58:35 +0000 (12:58 -0500)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 17 Dec 2019 09:46:43 +0000 (11:46 +0200)
commit3f26d3a84ff829e3b659bc82d8c180d2e5471a29
treef69752a69b3338d21d95331963c7c86133d62cbf
parent42c40fa9ab776d43e2a94ad0e0142652b0227b41
security: keys: trusted: fix lost handle flush

The original code, before it was moved into security/keys/trusted-keys
had a flush after the blob unseal.  Without that flush, the volatile
handles increase in the TPM until it becomes unusable and the system
either has to be rebooted or the TPM volatile area manually flushed.
Fix by adding back the lost flush, which we now have to export because
of the relocation of the trusted key code may cause the consumer to be
modular.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Fixes: 38160eff169d ("KEYS: trusted: Move TPM2 trusted keys code")
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm2-cmd.c
include/linux/tpm.h
security/keys/trusted-keys/trusted_tpm2.c