Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1696002
| From | Michal Suchánek <msuchanek@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [tpmdd-devel] tpm: read burstcount from TPM_STS in one 32-bit transaction |
| Date | 2017-07-25 20:20 +0200 |
| Message-ID | <u7cB3-6fC-9@gated-at.bofh.it> (permalink) |
| References | <u77L4-3dw-5@gated-at.bofh.it> <u7bYl-5KR-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 25 Jul 2017 10:36:11 -0700
James Bottomley <jejb@linux.vnet.ibm.com> wrote:
> On Tue, 2017-07-25 at 15:04 +0200, Michal Suchánek wrote:
> > Hello,
> >
> > in commit 9754d45e9970 ("tpm: read burstcount from TPM_STS in one
> > 32-bit transaction") you change reading of two 8-bit values to one
> > 32bit read. This is obviously wrong wrt endianess unless the
> > underlying tpm_tis_read32 does endian conversion.
>
> Some of the bus read primitives do do endianness conversions. The
> problem is with the SPI attachment, which has unclear endianness. A
> standard PCI bus attachment uses ioread32() which automatically
> transforms from a little endian bus to the cpu endianness, however SPI
> is forced to transfer the bytes one at a time over the serial bus and
> then transform. The assumption seems to be that the TIS TPM is
> replying in little endian format when SPI connected.
>
Yes, that makes sense.
Thanks for clarification.
Michal
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
tpm: read burstcount from TPM_STS in one 32-bit transaction Michal Suchánek <msuchanek@suse.de> - 2017-07-25 15:10 +0200
Re: [tpmdd-devel] tpm: read burstcount from TPM_STS in one 32-bit transaction James Bottomley <jejb@linux.vnet.ibm.com> - 2017-07-25 19:40 +0200
Re: [tpmdd-devel] tpm: read burstcount from TPM_STS in one 32-bit transaction Michal Suchánek <msuchanek@suse.de> - 2017-07-25 20:20 +0200
csiph-web