x86/asm/acpi: Create a stack frame in do_suspend_lowlevel()
authorJosh Poimboeuf <[email protected]>
Thu, 21 Jan 2016 22:49:21 +0000 (16:49 -0600)
committerIngo Molnar <[email protected]>
Wed, 24 Feb 2016 07:35:43 +0000 (08:35 +0100)
do_suspend_lowlevel() is a callable non-leaf function which doesn't
honor CONFIG_FRAME_POINTER, which can result in bad stack traces.

Create a stack frame for it when CONFIG_FRAME_POINTER is enabled.

Signed-off-by: Josh Poimboeuf <[email protected]>
Reviewed-by: Borislav Petkov <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Bernd Petrovitsch <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Chris J Arges <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Pedro Alves <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/7383d87dd40a460e0d757a0793498b9d06a7ee0d.1453405861.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/acpi/wakeup_64.S

index 8c35df4681041eee92f14020de8f795a8b7d710c..169963f471bbb2138352c2cdfd24d4f7cf9581a2 100644 (file)
@@ -5,6 +5,7 @@
 #include <asm/page_types.h>
 #include <asm/msr.h>
 #include <asm/asm-offsets.h>
+#include <asm/frame.h>
 
 # Copyright 2003 Pavel Machek <[email protected]>, distribute under GPLv2
 
@@ -39,6 +40,7 @@ bogus_64_magic:
        jmp     bogus_64_magic
 
 ENTRY(do_suspend_lowlevel)
+       FRAME_BEGIN
        subq    $8, %rsp
        xorl    %eax, %eax
        call    save_processor_state
@@ -109,6 +111,7 @@ ENTRY(do_suspend_lowlevel)
 
        xorl    %eax, %eax
        addq    $8, %rsp
+       FRAME_END
        jmp     restore_processor_state
 ENDPROC(do_suspend_lowlevel)