Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-29 Thread Jarkko Sakkinen
On Fri, Jan 27, 2017 at 09:24:16AM -0700, Jason Gunthorpe wrote: > On Fri, Jan 27, 2017 at 08:43:27AM +0200, Jarkko Sakkinen wrote: > > On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > > > On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > > > > > > > "The error

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-29 Thread Jarkko Sakkinen
On Fri, Jan 27, 2017 at 09:24:16AM -0700, Jason Gunthorpe wrote: > On Fri, Jan 27, 2017 at 08:43:27AM +0200, Jarkko Sakkinen wrote: > > On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > > > On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > > > > > > > "The error

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-27 Thread Jason Gunthorpe
On Fri, Jan 27, 2017 at 08:43:27AM +0200, Jarkko Sakkinen wrote: > On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > > On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > > > > > "The error code handling is bogus as any error code that has the bits > > > set that

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-27 Thread Jason Gunthorpe
On Fri, Jan 27, 2017 at 08:43:27AM +0200, Jarkko Sakkinen wrote: > On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > > On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > > > > > "The error code handling is bogus as any error code that has the bits > > > set that

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-26 Thread Jarkko Sakkinen
On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > > > "The error code handling is bogus as any error code that has the bits > > set that TPM_RC_HASH could pass. Implemented tpm2_rc_value() helper to > > parse the

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-26 Thread Jarkko Sakkinen
On Thu, Jan 26, 2017 at 11:32:52AM -0700, Jason Gunthorpe wrote: > On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > > > "The error code handling is bogus as any error code that has the bits > > set that TPM_RC_HASH could pass. Implemented tpm2_rc_value() helper to > > parse the

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-26 Thread Jason Gunthorpe
On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > "The error code handling is bogus as any error code that has the bits > set that TPM_RC_HASH could pass. Implemented tpm2_rc_value() helper to > parse the error value from FMT0 and FMT1 error codes to use to check the > error so

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-26 Thread Jason Gunthorpe
On Thu, Jan 26, 2017 at 01:27:14PM +0200, Jarkko Sakkinen wrote: > "The error code handling is bogus as any error code that has the bits > set that TPM_RC_HASH could pass. Implemented tpm2_rc_value() helper to > parse the error value from FMT0 and FMT1 error codes to use to check the > error so

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-26 Thread Jarkko Sakkinen
On Wed, Jan 25, 2017 at 03:12:45PM -0700, Jason Gunthorpe wrote: > On Wed, Jan 25, 2017 at 11:03:48PM +0200, Jarkko Sakkinen wrote: > > Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") > > Signed-off-by: Jarkko Sakkinen > > I think you

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-26 Thread Jarkko Sakkinen
On Wed, Jan 25, 2017 at 03:12:45PM -0700, Jason Gunthorpe wrote: > On Wed, Jan 25, 2017 at 11:03:48PM +0200, Jarkko Sakkinen wrote: > > Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") > > Signed-off-by: Jarkko Sakkinen > > I think you need a commit message for this..

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-25 Thread Jason Gunthorpe
On Wed, Jan 25, 2017 at 11:03:48PM +0200, Jarkko Sakkinen wrote: > Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") > Signed-off-by: Jarkko Sakkinen I think you need a commit message for this.. Is this following the spec? Jason

Re: [PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-25 Thread Jason Gunthorpe
On Wed, Jan 25, 2017 at 11:03:48PM +0200, Jarkko Sakkinen wrote: > Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") > Signed-off-by: Jarkko Sakkinen I think you need a commit message for this.. Is this following the spec? Jason

[PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-25 Thread Jarkko Sakkinen
Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm.h | 5 + drivers/char/tpm/tpm2-cmd.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH] tpm: fix RC value check in tpm2_seal_trusted

2017-01-25 Thread Jarkko Sakkinen
Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm.h | 5 + drivers/char/tpm/tpm2-cmd.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h