[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150915100956.GA3264@intel.com>
Date: Tue, 15 Sep 2015 13:09:56 +0300
From: Jarkko Sakkinen <jarkko.sakkinen@...el.com>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
Peter Huewe <peterhuewe@....de>,
Marcel Selhorst <tpmdd@...horst.net>
Subject: Re: [PATCH] tpm, tpm_crb: fix unaligned read of the command buffer
address
On Mon, Sep 14, 2015 at 11:35:23AM -0600, Jason Gunthorpe wrote:
> On Mon, Sep 14, 2015 at 08:15:23PM +0300, Jarkko Sakkinen wrote:
> > The command buffer address is necessarily not naturally aligned.
> > The hardware drops the entire read on some platforms and fills the
> > address with 1's. This patch fixes the issue by splitting the read
> > into two 32 bit reads.
>
> Is this necessary? The packed attribution means that unaligned members
> are allowed and the compiler deals with it where necessary.
For regular memory memory controller splits the read into two 32 bit
reads.
However, for MMIO address the hardware might abort the entire request
when trying to do a 64-bit read, which causes the CPU to fill the result
with 1's.
This is not hypothetical bug. We are experiencing this on some platforms
and the proposed fix resolves the issue.
> Jason
/Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists