• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisionf48a7236220bf6ed94ed14eece07d096bf68894f (tree)
Zeit2006-08-31 06:04:31
AutorPaX Team <pageexec@free...>
CommiterWilly Tarreau

Log Message

[PATCH] i386 : fix exception processing in early boot

fix the longest existing kernel bug ever (since 0.01 ;-). basically,
the dummy interrupt handler installed for the early boot period does
not work for exceptions that push an error code as well, effectively
making the iret at the end of the handler to trigger another exception,
ad infinitum, or rather, until the kernel stack runs over, trashes all
memory below and eventually causes a CPU reset or a hang. without this
fix the early printk facility in 2.6 is also rather useless.

Ändern Zusammenfassung

Diff

--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -325,27 +325,21 @@ ENTRY(stack_start)
325325
326326 /* This is the default interrupt "handler" :-) */
327327 int_msg:
328- .asciz "Unknown interrupt\n"
328+ .asciz "Unknown interrupt, stack: %p %p %p %p\n"
329329 ALIGN
330330 ignore_int:
331331 cld
332- pushl %eax
333- pushl %ecx
334- pushl %edx
335- pushl %es
336- pushl %ds
337332 movl $(__KERNEL_DS),%eax
338333 movl %eax,%ds
339334 movl %eax,%es
335+ pushl 12(%esp)
336+ pushl 12(%esp)
337+ pushl 12(%esp)
338+ pushl 12(%esp)
340339 pushl $int_msg
341340 call SYMBOL_NAME(printk)
342- popl %eax
343- popl %ds
344- popl %es
345- popl %edx
346- popl %ecx
347- popl %eax
348- iret
341+1: hlt
342+ jmp 1b
349343
350344 /*
351345 * The interrupt descriptor table has room for 256 idt's,
Show on old repository browser