Re: [PATCH] tpm: use get_unaligned_be32 unaligned buffer access.

2016-12-03 Thread Jarkko Sakkinen
Hey, On Thu, Nov 24, 2016 at 03:34:00PM +0200, Jarkko Sakkinen wrote: > On Wed, Nov 23, 2016 at 01:04:54PM +0200, Tomas Winkler wrote: > > Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on > > all platforms for unaligned access. > > > > The fix doesn't cover all the cases as also som

Re: [PATCH] tpm: use get_unaligned_be32 unaligned buffer access.

2016-11-24 Thread Jarkko Sakkinen
On Wed, Nov 23, 2016 at 01:04:54PM +0200, Tomas Winkler wrote: > Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on > all platforms for unaligned access. > > The fix doesn't cover all the cases as also some cast > structures have members on unaligned addresses. > > Signed-off-by: Toma

Re: [PATCH] tpm: use get_unaligned_be32 unaligned buffer access.

2016-11-23 Thread Jason Gunthorpe
On Wed, Nov 23, 2016 at 08:56:25PM +, Winkler, Tomas wrote: > > On Wed, Nov 23, 2016 at 01:04:54PM +0200, Tomas Winkler wrote: > > > Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on all > > > platforms for unaligned access. > > > > > > The fix doesn't cover all the cases as also s

RE: [PATCH] tpm: use get_unaligned_be32 unaligned buffer access.

2016-11-23 Thread Winkler, Tomas
> On Wed, Nov 23, 2016 at 01:04:54PM +0200, Tomas Winkler wrote: > > Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on all > > platforms for unaligned access. > > > > The fix doesn't cover all the cases as also some cast structures have > > members on unaligned addresses. > > I think

Re: [PATCH] tpm: use get_unaligned_be32 unaligned buffer access.

2016-11-23 Thread Jason Gunthorpe
On Wed, Nov 23, 2016 at 01:04:54PM +0200, Tomas Winkler wrote: > Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on > all platforms for unaligned access. > > The fix doesn't cover all the cases as also some cast > structures have members on unaligned addresses. I think this is a good

[PATCH] tpm: use get_unaligned_be32 unaligned buffer access.

2016-11-23 Thread Tomas Winkler
Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on all platforms for unaligned access. The fix doesn't cover all the cases as also some cast structures have members on unaligned addresses. Signed-off-by: Tomas Winkler --- drivers/char/tpm/tpm-interface.c| 4 ++-- drivers/char/tp