[PATCH v2 4/5] multiboot2: Avoid first 0x500 bytes

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

 



In some cases, add_buffer will actually try to allocate the buffer
at 0x0, which may not be acceptable by some kernels. Let's avoid
the first 0x500 bytes so we don't screw up the IVT and BDA.

Signed-off-by: Zhaofeng Li <hello@xxxxxxxxxxx>
---
 kexec/arch/i386/kexec-mb2-x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/arch/i386/kexec-mb2-x86.c b/kexec/arch/i386/kexec-mb2-x86.c
index f3c6438..f3e6b38 100644
--- a/kexec/arch/i386/kexec-mb2-x86.c
+++ b/kexec/arch/i386/kexec-mb2-x86.c
@@ -526,7 +526,7 @@ int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
 		rel_min = lu_start + 4096;
 		rel_max = lu_end;
 	} else {
-		rel_min = 0;
+		rel_min = 0x500;
 		rel_max = ULONG_MAX;
 	}
 
-- 
2.32.0


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux