Re: [tpmdd-devel] [PATCH v2] tpm: introduce struct tpm_buf

2015-06-09 Thread Jarkko Sakkinen
On Tue, Jun 09, 2015 at 01:58:59PM +0200, Peter Huewe wrote: > > > Am 9. Juni 2015 13:39:13 MESZ, schrieb Jarkko Sakkinen > : > >On Tue, Jun 09, 2015 at 12:32:57PM +0200, Peter Huewe wrote: > >> > >> > >> Hi > >> > >> >> > +static inline void tpm_buf_store(struct tpm_buf *buf, > >> >> > +

Re: [tpmdd-devel] [PATCH v2] tpm: introduce struct tpm_buf

2015-06-09 Thread Peter Huewe
Am 9. Juni 2015 13:39:13 MESZ, schrieb Jarkko Sakkinen : >On Tue, Jun 09, 2015 at 12:32:57PM +0200, Peter Huewe wrote: >> >> >> Hi >> >> >> > +static inline void tpm_buf_store(struct tpm_buf *buf, >> >> > +unsigned int pos, >> >> > +

Re: [tpmdd-devel] [PATCH v2] tpm: introduce struct tpm_buf

2015-06-09 Thread Jarkko Sakkinen
On Tue, Jun 09, 2015 at 12:32:57PM +0200, Peter Huewe wrote: > > > Hi > > >> > +static inline void tpm_buf_store(struct tpm_buf *buf, > >> > + unsigned int pos, > >> > + const unsigned char *data, > >> > +

Re: [tpmdd-devel] [PATCH v2] tpm: introduce struct tpm_buf

2015-06-09 Thread Peter Huewe
Hi >> > +static inline void tpm_buf_store(struct tpm_buf *buf, >> > + unsigned int pos, >> > + const unsigned char *data, >> > + unsigned int len) >> > +{ >> > + BUG_ON((pos + len) > TPM_BUF_SIZE); >> > + >> > + memc

Re: [PATCH v2] tpm: introduce struct tpm_buf

2015-06-09 Thread Jarkko Sakkinen
On Mon, Jun 08, 2015 at 10:39:32PM +0200, Peter Hüwe wrote: > Hi, > > > Am Mittwoch, 3. Juni 2015, 18:39:14 schrieb Jarkko Sakkinen: > > This patch introduces struct tpm_buf that provides a string buffer for > > constructing TPM commands. This allows to construct variable sized TPM > > commands.

Re: [PATCH v2] tpm: introduce struct tpm_buf

2015-06-08 Thread Peter Hüwe
Hi, Am Mittwoch, 3. Juni 2015, 18:39:14 schrieb Jarkko Sakkinen: > This patch introduces struct tpm_buf that provides a string buffer for > constructing TPM commands. This allows to construct variable sized TPM > commands. This feature is needed for TPM 2.0 commands in order to allow > policy aut

[PATCH v2] tpm: introduce struct tpm_buf

2015-06-03 Thread Jarkko Sakkinen
This patch introduces struct tpm_buf that provides a string buffer for constructing TPM commands. This allows to construct variable sized TPM commands. This feature is needed for TPM 2.0 commands in order to allow policy authentication and algorithmic agility. The commands in the tpm2-cmd.c have b