]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86, debug: remove the confusing entry in call trace
authorjia zhang <jia.zhang2008@gmail.com>
Sun, 23 Nov 2008 14:47:10 +0000 (22:47 +0800)
committerIngo Molnar <mingo@elte.hu>
Sun, 23 Nov 2008 19:03:36 +0000 (20:03 +0100)
Impact: improve backtrace quality

avoid the confusion in call trace because of the lack of padding at the
tail of function.

When do_exit gets called, the return address behind call instruction is
pushed into stack. If something get wrong in do_exit, for x86_64, the
entry "kernel_execve +0x00/0xXX" rather than "child_rip +0xYY/0xZZ" is
in the call trace.

That looks confusing, so add a u2d to make the return address still part
of the original call site. (This also catches any instances of us returning
from that function somehow.)

Signed-off-by: jia zhang <jia.zhang2008@gmail.com>
Acked-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S

index 28b597ef9ca16b7992c333f10eae252ea695475c..f6402c4ba10dae5241604da1cd2614e6113966d0 100644 (file)
@@ -1051,6 +1051,7 @@ ENTRY(kernel_thread_helper)
        push %eax
        CFI_ADJUST_CFA_OFFSET 4
        call do_exit
+       ud2                     # padding for call trace
        CFI_ENDPROC
 ENDPROC(kernel_thread_helper)
 
index ddeeb1052583578533f67cf0674e1620c7edc600..4a16bf31c78353452514e526d66169555ddaa5c4 100644 (file)
@@ -1172,6 +1172,7 @@ child_rip:
        # exit
        mov %eax, %edi
        call do_exit
+       ud2                     # padding for call trace
        CFI_ENDPROC
 ENDPROC(child_rip)