Re: Getting weird TPM error after rebasing my tree to security/next-general
From: Jarkko Sakkinen
Date: Thu Jan 31 2019 - 13:35:38 EST
On Thu, Jan 31, 2019 at 07:06:03PM +0200, Jarkko Sakkinen wrote:
> Found something that *does* fix the issue. If I replace memcpy_*io()
> calls with regular memcpy(), the driver works and all my tests pass.
OK, so the length of the response is not trashed, but only the error
code. The attached patch fully fixes the issue.
Here's the header again:
struct tpm_output_header {
__be16 tag;
__be32 length;
__be32 return_code;
} __packed;
The first to fields *are* read correctly and the last field get 1's
(thus TPM error -1).
With the attached the patch things work properly, but still
unsatisfactory fix (return to old behavior because it seems to
work).
/Jarkko