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

Jason Gunthorpe
2017-11-20T18:04:14Z

On Mon, Nov 20, 2017 at 10:26:01AM +0100, Javier Martinez Canillas wrote:

> I thought the TPM spaces was about exposing a virtualized TPM that didn't
> have the limitation of only allowing to store a small set of transient
> objects (so user-space didn't have to deal with the handles flushing and
> context save/load), rather than relaxing the access control to the TPM.

Somehow it became about both ..

The kernel defaults the tpmrm to root only, so the distro can decide
how to set it up. Some people are giving access to unpriv users.

> Having said that, I'm happy to implement the synthesized response when
> the command is not supported, if that's the correct way to resolve this.

It seems like it, from what I can see, but only if the command is not
supported..

You should double check with James of course.

Jason