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

[Xen-devel] [PATCH] Increment buffer used to read first boot sector in order to accomodate space for 4k sector


  • To: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • From: Frediano Ziglio <frediano.ziglio@xxxxxxxxxx>
  • Date: Fri, 3 Aug 2012 15:50:50 +0100
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Delivery-date: Fri, 03 Aug 2012 14:51:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac1xh1/K/CCLHNCBRpaT0ze5//VGGA==
  • Thread-topic: [PATCH] Increment buffer used to read first boot sector in order to accomodate space for 4k sector

If a 4k disk is used for first BIOS disk loader corrupt itself.

This patch increase sector buffer in order to avoid this overflow

Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxxx>
---
 xen/arch/x86/boot/edd.S        |    2 +-
 xen/arch/x86/boot/trampoline.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/boot/edd.S b/xen/arch/x86/boot/edd.S
index 2c8df8c..1c802a6 100644
--- a/xen/arch/x86/boot/edd.S
+++ b/xen/arch/x86/boot/edd.S
@@ -154,4 +154,4 @@ boot_mbr_signature_nr:
 boot_mbr_signature:
         .fill   EDD_MBR_SIG_MAX*8,1,0
 boot_edd_info:
-        .fill   512,1,0                         # big enough for a disc sector
+        .fill   4096,1,0                         # big enough for a disc sector
diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S
index 4421fc2..bd54c9e 100644
--- a/xen/arch/x86/boot/trampoline.S
+++ b/xen/arch/x86/boot/trampoline.S
@@ -224,6 +224,6 @@ skip_realmode:
 rm_idt: .word   256*4-1, 0, 0
 
 #include "mem.S"
-#include "edd.S"
 #include "video.S"
 #include "wakeup.S"
+#include "edd.S"
-- 
1.7.5.4

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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