On 9/13/2018 10:22 AM, James Bottomley wrote:
Exact buffer size hasn't been thought to be an issue since you know that any response will fit into MAX_RESPONSE_SIZE which the current implementation defines to be 4096.
If a caller wishes to optimize, TPM 2.0 has these two getcapabilities. TPM_PT_MAX_COMMAND_SIZE - the maximum value for commandSize in a command TPM_PT_MAX_RESPONSE_SIZE - the maximum value for responseSize in a response