History

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.

Stefan Berger committed 9 years ago

Commit be4c9ac1 parent 85ab3bf3 files · +41 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/vtpm_proxy.h+4−0
@@ -46,4 +46,8 @@ struct vtpm_proxy_new_dev { · 45 unmodified lines
4646
4747 #define VTPM_PROXY_IOC_NEW_DEV _IOWR(0xa1, 0x00, struct vtpm_proxy_new_dev)
4848
49+/* vendor specific commands to set locality */
50+#define TPM2_CC_SET_LOCALITY 0x20001000
51+#define TPM_ORD_SET_LOCALITY 0x20001000
52+
4953 #endif /* _UAPI_LINUX_VTPM_PROXY_H */