Releasing debian version 3:6.03+dfsg-10.
[syslinux-debian.git] / debian / patches / 0006-load-linux-protected-mode.patch
blob58bda3b819f09ff91a12c019419455db0bf9cef7
1 Author: Scot Doyle <lkml14@scotdoyle.com>
2 Description: load_linux: relocate protected-mode code as intended
3 If the kernel is relocatable and the protected mode code will not fit
4 in the initially determined location, that code will be moved to the
5 next available location. However, beginning with commit 8f470e7b, the
6 code is moved to the initially determined location instead of the next
7 available location because prot_mode_base is no longer updated to the
8 correct location. Since whdr->code32_start is updated, it is pointing
9 to the wrong execution start location, random code is executed and
10 the machine is rebooted.
12 Restore the old behavior by assigning prot_mode_base the value of
13 base. Tested on a machine that exposed this behavior.
15 diff -Naurp syslinux.orig/com32/lib/syslinux/load_linux.c syslinux/com32/lib/syslinux/load_linux.c
16 --- syslinux.orig/com32/lib/syslinux/load_linux.c
17 +++ syslinux/com32/lib/syslinux/load_linux.c
18 @@ -323,6 +323,7 @@ int bios_boot_linux(void *kernel_buf, si
21 whdr->code32_start += base - prot_mode_base;
22 + prot_mode_base = base;
24 /* Real mode code */
25 if (syslinux_memmap_find(amap, &real_mode_base,