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

From: Jason Gunthorpe
Date: Wed Nov 22 2017 - 15:13:15 EST

On Wed, Nov 22, 2017 at 09:16:25AM -0800, flihp wrote:

> We can work around quirks in the kernel RM in user space if we must
> (short term?) but I'm hesitant to do so in this case. Would feel better
> about a short term work-around knowing it's only going to be short term.

Pedantically, the kernel is not implementing a RM as per some spec, it
is using the TPM features to create isolation.

Both sides can be argued. In this case, I think the patch to add a TPM
response buffer in this one case is reasonable, and does not look so
complicated that it is dangerous in the kernel.

However the kernel will continue to return errnos in various cases,
and a userspace that cannot handle them is kinda broken :)