Messages in this thread | | | Date | Thu, 23 Feb 2012 09:31:40 +1100 | From | Stephen Rothwell <> | Subject | Re: [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] | |