Re: [PATCH v5] tpm: add support for partial reads

2018-11-20 Thread Jarkko Sakkinen
On Tue, Nov 20, 2018 at 03:13:59PM -0800, Tadeusz Struk wrote: > On 11/20/18 3:07 PM, Jarkko Sakkinen wrote: > +/* Holds the resul of the last successful call to > tpm_transmit() */ > >>> This comment is cruft. > >> Do you want me to remove it? This is the comment you proposed. >

Re: [PATCH v5] tpm: add support for partial reads

2018-11-20 Thread Tadeusz Struk
On 11/20/18 3:07 PM, Jarkko Sakkinen wrote: + /* Holds the resul of the last successful call to tpm_transmit() */ >>> This comment is cruft. >> Do you want me to remove it? This is the comment you proposed. > As I explained before it made sense before you made the remark that > it can only ge

Re: [PATCH v5] tpm: add support for partial reads

2018-11-20 Thread Jarkko Sakkinen
On Tue, Nov 20, 2018 at 10:30:32AM -0800, Tadeusz Struk wrote: > On 11/20/18 4:48 AM, Jarkko Sakkinen wrote: > >> The usecase is implemented in this TSS commit: > >> https://github.com/tpm2-software/tpm2-tss/commit/ce982f67a67dc08e24683d30b05800648d8a264c > > Can you implement test for this to > >

Re: [PATCH v5] tpm: add support for partial reads

2018-11-20 Thread Jarkko Sakkinen
On Tue, Nov 20, 2018 at 10:36:14AM -0800, Tadeusz Struk wrote: > On 11/20/18 4:48 AM, Jarkko Sakkinen wrote: > >> + /* Holds the resul of the last successful call to tpm_transmit() */ > > This comment is cruft. > > Do you want me to remove it? This is the comment you proposed. As I explained bef

Re: [PATCH v5] tpm: add support for partial reads

2018-11-20 Thread Tadeusz Struk
On 11/20/18 4:48 AM, Jarkko Sakkinen wrote: >> +/* Holds the resul of the last successful call to tpm_transmit() */ > This comment is cruft. Do you want me to remove it? This is the comment you proposed. > >> +size_t response_length; > data_pending would be now perfectly fine name now th

Re: [PATCH v5] tpm: add support for partial reads

2018-11-20 Thread Tadeusz Struk
On 11/20/18 4:48 AM, Jarkko Sakkinen wrote: >> The usecase is implemented in this TSS commit: >> https://github.com/tpm2-software/tpm2-tss/commit/ce982f67a67dc08e24683d30b05800648d8a264c > Can you implement test for this to > > https://github.com/jsakkine-intel/tpm2-scripts Just created a PR for

Re: [PATCH v5] tpm: add support for partial reads

2018-11-20 Thread Jarkko Sakkinen
On Mon, Nov 19, 2018 at 10:55:15AM -0800, Tadeusz Struk wrote: > Currently to read a response from the TPM device an application needs > provide big enough buffer for the whole response and read it in one go. > The application doesn't know how big the response it beforehand so it > always needs to

[PATCH v5] tpm: add support for partial reads

2018-11-19 Thread Tadeusz Struk
Currently to read a response from the TPM device an application needs provide big enough buffer for the whole response and read it in one go. The application doesn't know how big the response it beforehand so it always needs to maintain a 4K buffer and read the max (4K). In case if the user of the