aboutsummaryrefslogtreecommitdiff
path: root/ipc/util.h
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-02-28 13:37:24 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-07 08:53:35 -0700
commit82c4c5d001608a9a3194bdf74fba824e1c2ec686 (patch)
tree124cdb48c5e9317069f84477e5793359eab4790d /ipc/util.h
parentaa703cc83786fabab0058713a424d5201e29dde2 (diff)
x86, efi: Fix endian issues and unaligned accesses
commit 92f42c50f227ad228f815a8f4eec872524dae3a5 upstream. 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 <hpa@zytor.com> Cc: Nick Bowler <nbowler@elliptictech.com> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Link: http://lkml.kernel.org/r/1330436245-24875-6-git-send-email-matt@console-pimps.org Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc/util.h')
0 files changed, 0 insertions, 0 deletions