The undefined symbols naturally weren't relocated by kexec's linker, so
each compiled `call` instruction branched into the middle of itself. The
CPU proceeded to interpret the un-relocated address as instructions,
resulting in an undefined opcode fault. Since at this point no IDT is
loaded, that turned into a triple-fault and reboot.

The bug was only visible when running kexec with --console-vga.

Signed-off-by: Jamey Sharp <[EMAIL PROTECTED]>
---
Although GCC warned about this problem, it would have been easier to
diagnose if the ELF linking code in the kexec userspace tools would
report an error on attempting to link undefined symbols.

 purgatory/arch/i386/console-x86.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/purgatory/arch/i386/console-x86.c 
b/purgatory/arch/i386/console-x86.c
index 68f5daf..9773573 100644
--- a/purgatory/arch/i386/console-x86.c
+++ b/purgatory/arch/i386/console-x86.c
@@ -1,5 +1,5 @@
 #include <stdint.h>
-#include <sys/io.h>
+#include <arch/io.h>
 #include <purgatory.h>
 
 /*
-- 
1.5.4.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to