[PATCH v4 2/2] tpm: add support for partial reads

Tadeusz Struk tadeusz.struk at intel.com
Mon Nov 19 17:43:00 UTC 2018


On 11/19/18 9:28 AM, Jarkko Sakkinen wrote:
> Ah, you are correct.
> 
> You should add a boolean flag instead of introducing a new variable for
> holding amount that has been read because obviously one read operation
> is enough for backwards compatibility.
> 
> The code could read the code to data_pending and then set
> 
>    priv->data_read = false;
> 
> We do not need the original amount for anything.

but we still need to keep track of how much of the response is left unconsumed.

-- 
Tadeusz



More information about the Linux-security-module-archive mailing list