[syslinux] [PATCH] load_linux: relocate protected-mode code as intended

Gene Cumm gene.cumm at gmail.com
Sat Apr 18 04:16:23 PDT 2015


On Sat, Feb 7, 2015 at 10:46 PM, Scot Doyle via Syslinux
<syslinux at zytor.com> wrote:
> If the kernel is relocatable and the protected mode code will not fit
> in the initially determined location, that code will be moved to the
> next available location. However, beginning with commit 8f470e7b, the
> code is moved to the initially determined location instead of the next
> available location because prot_mode_base is no longer updated to the
> correct location. Since whdr->code32_start is updated, it is pointing
> to the wrong execution start location, random code is executed and
> the machine is rebooted.
>
> Restore the old behavior by assigning prot_mode_base the value of
> base. Tested on a machine that exposed this behavior.
>
> Signed-off-by: Scot Doyle <lkml14 at scotdoyle.com>

Excellent research.  Walking code before and after that commit made it
pretty easy to see.

Applied.

-- 
-Gene


More information about the Syslinux mailing list