]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix iret exception recovery on 64-bit
authorRoland McGrath <roland@redhat.com>
Wed, 6 Feb 2008 21:39:45 +0000 (22:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 6 Feb 2008 21:39:45 +0000 (22:39 +0100)
This change broke recovery of exceptions in iret:

   commit 72fe4858544292ad64600765cb78bc02298c6b1c
   Author: Glauber de Oliveira Costa <gcosta@redhat.com>

       x86: replace privileged instructions with paravirt macros

The ENTRY(native_iret) macro adds alignment padding before the iretq
instruction, so "iret_label" no longer points exactly at the instruction.
It was sloppy to leave the old "iret_label" label behind when replacing
its nearby use.  Removing it would have revealed the other use of the
label later in the file, and upon noticing that use, anyone exercising
the minimum of attention to detail expected of anyone touching this
subtle code would realize it needed to change as well.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/entry_64.S

index e518928114dbbfea91777826144de4cd631453e2..c7341e81941cc0e7d6863e317953316c2f045392 100644 (file)
@@ -582,7 +582,6 @@ retint_restore_args:        /* return to kernel space */
        TRACE_IRQS_IRETQ
 restore_args:
        RESTORE_ARGS 0,8,0                                              
-iret_label:    
 #ifdef CONFIG_PARAVIRT
        INTERRUPT_RETURN
 #endif
@@ -920,7 +919,7 @@ error_kernelspace:
           iret run with kernel gs again, so don't set the user space flag.
           B stepping K8s sometimes report an truncated RIP for IRET 
           exceptions returning to compat mode. Check for these here too. */
-       leaq iret_label(%rip),%rbp
+       leaq native_iret(%rip),%rbp
        cmpq %rbp,RIP(%rsp) 
        je   error_swapgs
        movl %ebp,%ebp  /* zero extend */