Commit-ID:  779c433b8ea5c9fdfb892265b2ca6213d1f12ff8
Gitweb:     http://git.kernel.org/tip/779c433b8ea5c9fdfb892265b2ca6213d1f12ff8
Author:     Josh Poimboeuf <jpoim...@redhat.com>
AuthorDate: Thu, 21 Jan 2016 16:49:23 -0600
Committer:  Ingo Molnar <mi...@kernel.org>
CommitDate: Wed, 24 Feb 2016 08:35:43 +0100

x86/asm/efi: Create a stack frame in efi_call()

efi_call() 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 <jpoim...@redhat.com>
Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk>
Reviewed-by: Borislav Petkov <b...@suse.de>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Andy Lutomirski <l...@amacapital.net>
Cc: Andy Lutomirski <l...@kernel.org>
Cc: Arnaldo Carvalho de Melo <a...@kernel.org>
Cc: Bernd Petrovitsch <be...@petrovitsch.priv.at>
Cc: Borislav Petkov <b...@alien8.de>
Cc: Brian Gerst <brge...@gmail.com>
Cc: Chris J Arges <chris.j.ar...@canonical.com>
Cc: Denys Vlasenko <dvlas...@redhat.com>
Cc: H. Peter Anvin <h...@zytor.com>
Cc: Jiri Slaby <jsl...@suse.cz>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Michal Marek <mma...@suse.cz>
Cc: Namhyung Kim <namhy...@gmail.com>
Cc: Pedro Alves <pal...@redhat.com>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: live-patch...@vger.kernel.org
Link: 
http://lkml.kernel.org/r/2294b6fad60eea4cc862eddc8e98a1324e6eeeca.1453405861.git.jpoim...@redhat.com
Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 arch/x86/platform/efi/efi_stub_64.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/platform/efi/efi_stub_64.S 
b/arch/x86/platform/efi/efi_stub_64.S
index 86d0f9e..0df2dcc 100644
--- a/arch/x86/platform/efi/efi_stub_64.S
+++ b/arch/x86/platform/efi/efi_stub_64.S
@@ -11,6 +11,7 @@
 #include <asm/msr.h>
 #include <asm/processor-flags.h>
 #include <asm/page_types.h>
+#include <asm/frame.h>
 
 #define SAVE_XMM                       \
        mov %rsp, %rax;                 \
@@ -74,6 +75,7 @@
        .endm
 
 ENTRY(efi_call)
+       FRAME_BEGIN
        SAVE_XMM
        mov (%rsp), %rax
        mov 8(%rax), %rax
@@ -88,6 +90,7 @@ ENTRY(efi_call)
        RESTORE_PGT
        addq $48, %rsp
        RESTORE_XMM
+       FRAME_END
        ret
 ENDPROC(efi_call)
 

Reply via email to