start_cpu() pushes a text address on the stack so that stack traces from
idle tasks will show start_cpu() at the end.  But it uses a call
instruction to do that, which is rather obtuse.  Use a straightforward
push instead.

Suggested-by: Borislav Petkov <b...@alien8.de>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
 arch/x86/kernel/head_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 90de288..1facaf4 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -298,7 +298,7 @@ ENTRY(start_cpu)
         *      REX.W + FF /5 JMP m16:64 Jump far, absolute indirect,
         *              address given in m16:64.
         */
-       call    1f              # put return address on stack for unwinder
+       pushq   $1f             # put return address on stack for unwinder
 1:     xorq    %rbp, %rbp      # clear frame pointer
        movq    initial_code(%rip), %rax
        pushq   $__KERNEL_CS    # set correct cs
-- 
2.7.4

Reply via email to