Re: [RFC PATCH] tpm: don't return -EINVAL if TPM command validation fails

From: Jason Gunthorpe
Date: Fri Nov 17 2017 - 12:58:58 EST


On Fri, Nov 17, 2017 at 06:56:09PM +0100, Javier Martinez Canillas wrote:

> Yes, the problem with that is user-space not having enough information about
> what went wrong. Right now the TCTI layer just reports TSS2_BASE_RC_IO_ERROR
> in this case and can't be blamed.

Well, if you care about the differnce between a transport failure and
a kernel rejection due to validation, then it needs to report a
different code :)

> > Regarding your specific issue, can you make the command you want to
> > use validate? Would that make sense?
>
> Sorry, I'm not sure to understand what you meant. Could you please elaborate?

Make it so tpm_validate will accept the command being sent.

Jason