From b13f79a427b6ae6c1405c48b8cf57a1e99de16f9 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 21 Apr 2011 00:07:22 +0100 Subject: [PATCH] Fix stack pointer handling in 16-bit relocator. * grub-core/lib/i386/relocator16.S (grub_relocator16_start): Move grub_relocator16_sp to %esp rather than %ss, and zero-extend it. Fixes Ubuntu bug #683904. --- ChangeLog | 8 ++++++++ grub-core/lib/i386/relocator16.S | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 083d22ec5..98d3b0ea8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-04-21 Colin Watson + + Fix stack pointer handling in 16-bit relocator. + + * grub-core/lib/i386/relocator16.S (grub_relocator16_start): Move + grub_relocator16_sp to %esp rather than %ss, and zero-extend it. + Fixes Ubuntu bug #683904. + 2011-04-20 Vladimir Serbinenko * configure.ac: Bump version to 1.99~rc2. diff --git a/grub-core/lib/i386/relocator16.S b/grub-core/lib/i386/relocator16.S index c3768f4eb..982415de4 100644 --- a/grub-core/lib/i386/relocator16.S +++ b/grub-core/lib/i386/relocator16.S @@ -130,7 +130,7 @@ VARIABLE(grub_relocator16_ss) .byte 0xb8 VARIABLE(grub_relocator16_sp) .word 0 - movw %ax, %ss + movzwl %ax, %esp /* movw imm32, %edx. */ .byte 0x66, 0xba