* [PATCH v5 06/10] x86/asm/efi: Fix asmvalidate warnings for efi_stub_64.S [not found] ` <cover.1433937132.git.jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2015-06-10 12:06 ` Josh Poimboeuf [not found] ` <3e1d9ce523b3174a49b4317cd8b1b85dfd0c319a.1433937132.git.jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Josh Poimboeuf @ 2015-06-10 12:06 UTC (permalink / raw) To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin Cc: Michal Marek, Peter Zijlstra, Andy Lutomirski, Borislav Petkov, Linus Torvalds, Andi Kleen, x86-DgEjT+Ai2ygdnm+yROfE0A, live-patching-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matt Fleming, linux-efi-u79uwXL29TY76Z2rM5mHXA Fix the following asmvalidate warnings: asmvalidate: arch/x86/platform/efi/efi_stub_64.o: efi_call(): missing FP_SAVE/RESTORE macros asmvalidate: arch/x86/boot/compressed/efi_stub_64.o: efi_call(): missing FP_SAVE/RESTORE macros efi_call() is a non-leaf callable function, so save/restore the frame pointer with FP_SAVE/RESTORE. Signed-off-by: Josh Poimboeuf <jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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..0ca6bfb 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/func.h> #define SAVE_XMM \ mov %rsp, %rax; \ @@ -74,6 +75,7 @@ .endm ENTRY(efi_call) + FP_SAVE SAVE_XMM mov (%rsp), %rax mov 8(%rax), %rax @@ -88,6 +90,7 @@ ENTRY(efi_call) RESTORE_PGT addq $48, %rsp RESTORE_XMM + FP_RESTORE ret ENDPROC(efi_call) -- 2.1.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <3e1d9ce523b3174a49b4317cd8b1b85dfd0c319a.1433937132.git.jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH v5 06/10] x86/asm/efi: Fix asmvalidate warnings for efi_stub_64.S [not found] ` <3e1d9ce523b3174a49b4317cd8b1b85dfd0c319a.1433937132.git.jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2015-06-11 13:14 ` Matt Fleming 2015-06-12 19:24 ` Borislav Petkov 0 siblings, 1 reply; 3+ messages in thread From: Matt Fleming @ 2015-06-11 13:14 UTC (permalink / raw) To: Josh Poimboeuf Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Michal Marek, Peter Zijlstra, Andy Lutomirski, Borislav Petkov, Linus Torvalds, Andi Kleen, x86-DgEjT+Ai2ygdnm+yROfE0A, live-patching-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matt Fleming, linux-efi-u79uwXL29TY76Z2rM5mHXA On Wed, 10 Jun, at 07:06:14AM, Josh Poimboeuf wrote: > Fix the following asmvalidate warnings: > > asmvalidate: arch/x86/platform/efi/efi_stub_64.o: efi_call(): missing FP_SAVE/RESTORE macros > asmvalidate: arch/x86/boot/compressed/efi_stub_64.o: efi_call(): missing FP_SAVE/RESTORE macros > > efi_call() is a non-leaf callable function, so save/restore the frame > pointer with FP_SAVE/RESTORE. > > Signed-off-by: Josh Poimboeuf <jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > Cc: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > --- > arch/x86/platform/efi/efi_stub_64.S | 3 +++ > 1 file changed, 3 insertions(+) Yeah, fair enough. Though it's worth noting that because we're calling firmware functions, which use the Microsoft ABI, %rbp will be saved by the callee function if used. Anyway, Acked-by: Matt Fleming <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> And since I know Boris in particular has poked around in this area, an ACK from him would be worth alot. -- Matt Fleming, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v5 06/10] x86/asm/efi: Fix asmvalidate warnings for efi_stub_64.S 2015-06-11 13:14 ` Matt Fleming @ 2015-06-12 19:24 ` Borislav Petkov 0 siblings, 0 replies; 3+ messages in thread From: Borislav Petkov @ 2015-06-12 19:24 UTC (permalink / raw) To: Matt Fleming Cc: Josh Poimboeuf, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Michal Marek, Peter Zijlstra, Andy Lutomirski, Linus Torvalds, Andi Kleen, x86, live-patching, linux-kernel, Matt Fleming, linux-efi On Thu, Jun 11, 2015 at 02:14:39PM +0100, Matt Fleming wrote: > Yeah, fair enough. Though it's worth noting that because we're calling > firmware functions, which use the Microsoft ABI, %rbp will be saved by > the callee function if used. Yeah, just looked at the spec. But you know how we don't trust specs. So we get additional paranoid security that callee won't futz with RBP because we save it before calling. But we pay the additional penalty in the CONFIG_FRAME_POINTER case. Oh what the hell, the 3 additional insns shouldn't be noticeable. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-12 19:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1433937132.git.jpoimboe@redhat.com>
[not found] ` <cover.1433937132.git.jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-10 12:06 ` [PATCH v5 06/10] x86/asm/efi: Fix asmvalidate warnings for efi_stub_64.S Josh Poimboeuf
[not found] ` <3e1d9ce523b3174a49b4317cd8b1b85dfd0c319a.1433937132.git.jpoimboe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-06-11 13:14 ` Matt Fleming
2015-06-12 19:24 ` Borislav Petkov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox