Skip to content

Commit 779c433

Browse files
jpoimboeIngo Molnar
authored andcommitted
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 <jpoimboe@redhat.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Reviewed-by: Borislav Petkov <bp@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Chris J Arges <chris.j.arges@canonical.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michal Marek <mmarek@suse.cz> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Pedro Alves <palves@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/2294b6fad60eea4cc862eddc8e98a1324e6eeeca.1453405861.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 3387a53 commit 779c433

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/platform/efi/efi_stub_64.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <asm/msr.h>
1212
#include <asm/processor-flags.h>
1313
#include <asm/page_types.h>
14+
#include <asm/frame.h>
1415

1516
#define SAVE_XMM \
1617
mov %rsp, %rax; \
@@ -74,6 +75,7 @@
7475
.endm
7576

7677
ENTRY(efi_call)
78+
FRAME_BEGIN
7779
SAVE_XMM
7880
mov (%rsp), %rax
7981
mov 8(%rax), %rax
@@ -88,6 +90,7 @@ ENTRY(efi_call)
8890
RESTORE_PGT
8991
addq $48, %rsp
9092
RESTORE_XMM
93+
FRAME_END
9194
ret
9295
ENDPROC(efi_call)
9396

0 commit comments

Comments
 (0)