x86/efi: Correct EFI boot stub use of code32_start
authorMatt Fleming <matt@console-pimps.org>
Tue, 8 Apr 2014 12:14:00 +0000 (13:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 May 2014 14:55:30 +0000 (07:55 -0700)
commit35d5134b7d5a55e269c953096224248b9f6f72c2
treebf5c5b9e459bb6e71b5d2cc7277469fdd581a1cc
parent9e2dcd00681f852c1cb1864f79e9992ea1b5981f
x86/efi: Correct EFI boot stub use of code32_start

commit 7e8213c1f3acc064aef37813a39f13cbfe7c3ce7 upstream.

code32_start should point at the start of the protected mode code, and
*not* at the beginning of the bzImage. This is much easier to do in
assembly so document that callers of make_boot_params() need to fill out
code32_start.

The fallout from this bug is that we would end up relocating the image
but copying the image at some offset, resulting in what appeared to be
memory corruption.

Reported-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/boot/compressed/eboot.c
arch/x86/boot/compressed/head_32.S
arch/x86/boot/compressed/head_64.S