tpm: vtpm_proxy: Implement request_locality function.
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Wed, 24 May 2017 21:39:40 +0000 (17:39 -0400)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 13 Jun 2017 19:02:09 +0000 (22:02 +0300)
commitbe4c9acfe2976b6e024d15656254d2eb207b83a8
treef06d321362ee2abdecb88530b5fb652fb67d3524
parent85ab3bf305b96e5f4c83b23a0b7e11d90144eb18
tpm: vtpm_proxy: Implement request_locality function.

Implement the request_locality function. To set the locality on the
backend we define vendor-specific TPM 1.2 and TPM 2 ordinals and send
a command to the backend to set the locality for the next commands.

To avoid recursing into requesting the locality, we set the
TPM_TRANSMIT_RAW flag when calling tpm_transmit_cmd. To avoid recursing
into TPM 2 space related commands, we set the space parameter to NULL.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm-interface.c
drivers/char/tpm/tpm_vtpm_proxy.c
include/uapi/linux/vtpm_proxy.h