Re: [PATCH] tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()

2019-09-17 Thread Jarkko Sakkinen
On Mon, Sep 16, 2019 at 02:04:54PM -0700, Jerry Snitselaar wrote: > On Mon Sep 16 19, Jerry Snitselaar wrote: > > On Mon Sep 16 19, Jarkko Sakkinen wrote: > > > tpm_send() does not give anymore the result back to the caller. This > > > would require another memcpy(), which kind of tells that the

Re: [PATCH] tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()

2019-09-16 Thread Jerry Snitselaar
On Mon Sep 16 19, Jerry Snitselaar wrote: On Mon Sep 16 19, Jarkko Sakkinen wrote: tpm_send() does not give anymore the result back to the caller. This would require another memcpy(), which kind of tells that the whole approach is somewhat broken. Instead, as Mimi suggested, this commit just

Re: [PATCH] tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()

2019-09-16 Thread Jerry Snitselaar
On Mon Sep 16 19, Jarkko Sakkinen wrote: tpm_send() does not give anymore the result back to the caller. This would require another memcpy(), which kind of tells that the whole approach is somewhat broken. Instead, as Mimi suggested, this commit just wraps the data to the tpm_buf, and thus the

[PATCH] tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()

2019-09-16 Thread Jarkko Sakkinen
tpm_send() does not give anymore the result back to the caller. This would require another memcpy(), which kind of tells that the whole approach is somewhat broken. Instead, as Mimi suggested, this commit just wraps the data to the tpm_buf, and thus the result will not go to the garbage.