[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190201081246.GA5728@linux.intel.com>
Date: Fri, 1 Feb 2019 10:12:46 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: "Winkler, Tomas" <tomas.winkler@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
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
On Thu, Jan 31, 2019 at 07:47:19PM +0000, Winkler, Tomas wrote:
>
> >
> > 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.
We could easily read the first 8 bytes instead of 6, and then check the
length. The benefit in doing that would be to be able to backport the
patch to stable kernels.
I'm fine with either solution.
Applying Linus' fix might anyway a good idea since given that tpm_crb
broke down, there is a finite probability that there might be some other
drivers that break down for similar reasons, but no one has noticed so
far.
Thus, I might even propose doing both...
/Jarkko
Powered by blists - more mailing lists