[lkml]   [2012]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC][PATCH 5/6] x86, efi: Fix endian issues and unaligned accesses
Hi all,

On Tue, 28 Feb 2012 13:37:24 +0000 Matt Fleming <> wrote:
> From: Matt Fleming <>
> We may need to convert the endianness of the data we read from/write
> to 'buf', so let's use {get,put}_unaligned_le32() to do that. Failure
> to do so can result in accessing invalid memory, leading to a
> segfault. Stephen Rothwell noticed this bug while cross-building an
> x86_64 allmodconfig kernel on PowerPC.
> We need to read from and write to 'buf' a byte at a time otherwise
> it's possible we'll perform an unaligned access, which can lead to bus
> errors when cross-building an x86 kernel on risc architectures.
> Cc: H. Peter Anvin <>
> Cc: Nick Bowler <>
> Tested-by: Stephen Rothwell <>
> Reported-by: Stephen Rothwell <>
> Signed-off-by: Matt Fleming <>

Just to be absolutely clear, I have not yet tested this version of the
patch and also this fixes a problem with cross building Linus' tree (i.e.
this is a regression with cross building introduced in v3.3-rc1).

Stephen Rothwell
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2012-02-29 00:55    [W:0.122 / U:5.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site