Re: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-06 Thread Jarkko Sakkinen
On Wed, Feb 06, 2019 at 12:55:55PM +, Winkler, Tomas wrote: > > Fixed comments and applied the patch, thank you. Do I amend your acked-by? > > Please, do. > Thanks > Tomas Great, thank you. /Jarkko

RE: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-06 Thread Winkler, Tomas
..@linux.intel.com] > > > > Sent: Tuesday, February 05, 2019 16:36 > > > > To: Winkler, Tomas > > > > Cc: linux-integr...@vger.kernel.org; linux-kernel@vger.kernel.org; > > > > linux- security-mod...@vger.kernel.org; sta...@vger.kernel.org; > &g

Re: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-06 Thread Jarkko Sakkinen
gt; Sent: Tuesday, February 05, 2019 16:36 > > > To: Winkler, Tomas > > > Cc: linux-integr...@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > > > security-mod...@vger.kernel.org; sta...@vger.kernel.org; James Morris > > > ; Jerry Snitselaar > > > Subje

Re: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-05 Thread Jarkko Sakkinen
egr...@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > > security-mod...@vger.kernel.org; sta...@vger.kernel.org; James Morris > > ; Jerry Snitselaar > > Subject: Re: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv() > > > > On Tue, Feb 05, 2019 at 11:07:16AM

RE: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-05 Thread Winkler, Tomas
..@vger.kernel.org; James Morris > ; Jerry Snitselaar > Subject: Re: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv() > > On Tue, Feb 05, 2019 at 11:07:16AM +, Winkler, Tomas wrote: > > > The current approach to read first 6 bytes from the response and > > &

Re: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-05 Thread Jarkko Sakkinen
On Tue, Feb 05, 2019 at 11:07:16AM +, Winkler, Tomas wrote: > > The current approach to read first 6 bytes from the response and then tail > > of > > the response, can cause the 2nd memcpy_fromio() to do an unaligned read > > (e.g. read 32-bit word from address aligned to a 16-bits),

RE: [PATCH v3] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-05 Thread Winkler, Tomas
> The current approach to read first 6 bytes from the response and then tail of > the response, can cause the 2nd memcpy_fromio() to do an unaligned read > (e.g. read 32-bit word from address aligned to a 16-bits), depending on how > memcpy_fromio() is implemented. If this happens, the read will