lkml.org 
[lkml]   [2012]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86, efi: Fix unaligned access and endian issues
Hi Matt,

On Wed, 22 Feb 2012 14:00:08 +0000 Matt Fleming <matt@console-pimps.org> wrote:
>
> From: Matt Fleming <matt.fleming@intel.com>
>
> 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 a
> segfault when cross-building an x86 kernel on risc architectures.
>
> Also, we may need to convert the endianness of the data we read
> from/write to buf, so let's add some helper functions to do that.
>
> Stephen Rothwell noticed this bug when he hit a segfault while
> cross-building an x86_64 allmodconfig kernel on PowerPC.
>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Matt Fleming <matt.fleming@intel.com>

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> (cross build only)

The bzImage from a ARCH=x86_64 defconfig+CONFIG_EFI_STUB cross build is
in http://ozlabs.org/~sfr/bzImage if you want to attempt to boot it.

One little thing is that those two new functions may we warned about as
unused if CONFIG_EFI_STUB is not set (I have not done that build yet).

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-02-22 23:35    [W:0.050 / U:1.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site