[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/EDD: check MBR for BIOS magic before considering signature valid


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 31 May 2012 22:22:08 +0000
  • Delivery-date: Thu, 31 May 2012 22:22:18 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <JBeulich@xxxxxxxx>
# Date 1338452293 -7200
# Node ID cdced279e79296f06ede71d92f5047235e4b6d55
# Parent  d7ae665b03afb88a813c6f197612215697eaf8f6
x86/EDD: check MBR for BIOS magic before considering signature valid

Signed-off-by: Jan Beulich <JBeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
---


diff -r d7ae665b03af -r cdced279e792 xen/arch/x86/boot/edd.S
--- a/xen/arch/x86/boot/edd.S   Thu May 31 10:15:42 2012 +0200
+++ b/xen/arch/x86/boot/edd.S   Thu May 31 10:18:13 2012 +0200
@@ -53,12 +53,16 @@ edd_mbr_sig_read:
         jc      edd_mbr_sig_done                # on failure, we're done.
         cmpb    $0, %ah                         # some BIOSes do not set CF
         jne     edd_mbr_sig_done                # on failure, we're done.
+        cmpw    $0xaa55, bootsym(boot_edd_info)+0x1fe
+        jne     .Ledd_mbr_sig_next
         movl    bootsym(boot_edd_info)+EDD_MBR_SIG_OFFSET,%eax
         movb    %dl, (%bx)                      # store BIOS drive number
         movl    %eax, 4(%bx)                    # store signature from MBR
         incb    bootsym(boot_mbr_signature_nr)  # note that we stored something
+        addw    $8, %bx                         # increment sig buffer ptr
+.Ledd_mbr_sig_next:
         incb    %dl                             # increment to next device
-        addw    $8, %bx                         # increment sig buffer ptr
+        jz      edd_mbr_sig_done
         cmpb    $EDD_MBR_SIG_MAX,bootsym(boot_mbr_signature_nr)
         jb      edd_mbr_sig_read
 edd_mbr_sig_done:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.