From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752122AbbINRf3 (ORCPT ); Mon, 14 Sep 2015 13:35:29 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:60382 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbbINRf2 (ORCPT ); Mon, 14 Sep 2015 13:35:28 -0400 Date: Mon, 14 Sep 2015 11:35:23 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Peter Huewe , Marcel Selhorst Subject: Re: [PATCH] tpm, tpm_crb: fix unaligned read of the command buffer address Message-ID: <20150914173523.GC21652@obsidianresearch.com> References: <1442250923-19804-1-git-send-email-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442250923-19804-1-git-send-email-jarkko.sakkinen@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.160 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Jason