[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B9DA8DA90@hasmsx108.ger.corp.intel.com>
Date: Thu, 31 Jan 2019 20:07:04 +0000
From: "Winkler, Tomas" <tomas.winkler@...el.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
CC: Jason Gunthorpe <jgg@...pe.ca>,
James Bottomley <James.Bottomley@...senpartnership.com>,
"linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>
Subject: RE: Getting weird TPM error after rebasing my tree to
security/next-general
> -----Original Message-----
> From: Winkler, Tomas
> Sent: Thursday, January 31, 2019 21:47
> To: 'Linus Torvalds' <torvalds@...ux-foundation.org>; Jarkko Sakkinen
> <jarkko.sakkinen@...ux.intel.com>
> Cc: Jason Gunthorpe <jgg@...pe.ca>; James Bottomley
> <James.Bottomley@...senpartnership.com>; linux-integrity@...r.kernel.org;
> linux-security-module@...r.kernel.org; Linux List Kernel Mailing <linux-
> kernel@...r.kernel.org>
> Subject: RE: Getting weird TPM error after rebasing my tree to security/next-
> general
>
>
> >
> > On Thu, Jan 31, 2019 at 10:52 AM Linus Torvalds <torvalds@...ux-
> > foundation.org> wrote:
> > >
> > > I think what I should do is to just make "memcpy_*io()" do the
> > > "align naturally" thing.
> > >
> > > Let me cook up a patch for you to test.
> >
> > Does this work for you?
> >
> > I haven't tested it at all, but I verified that the generated code
> > seems to make at least some amount of sense.
> >
> > Linus
>
> So dig into the spec and I think this is a bit relevant.
>
> TPM TCG according the spec requires that all buffer access is done sequentially
> from the start to end of the payload, Simply In case of skipping or going back
> the transaction is aborted.
> The write transactions should be 1 or power of 2. So in general 6 byte read
> should not work. But I'm sure our hw really obey this restriction.
For alignment of register access the spec specifies:
Some instantiating hardware may have size and alignment restrictions when accessing any of the fields in this interface. Some hardware may require access to any of data within a field or buffer be performed by reads or writes which are naturally aligned. For this reason, software should access the fields and buffers defined in this interface using instructions which do not cause an access to cross an alignment boundary and should not use string move instructions
This is for register address, I'm not sure this spans also for request response buffer, but from the behavior looks like it applies there two.
Thanks
Tomas
Powered by blists - more mailing lists