* [GIT PULL] EFI urgent fix @ 2016-05-13 20:34 Matt Fleming 2016-05-13 20:34 ` [PATCH] x86/efi: Fix 7th argument to efi_call Matt Fleming 0 siblings, 1 reply; 3+ messages in thread From: Matt Fleming @ 2016-05-13 20:34 UTC (permalink / raw) To: Ingo Molnar, Thomas Gleixner, H . Peter Anvin Cc: Matt Fleming, Ard Biesheuvel, linux-kernel, linux-efi, Alex Thorlton, Borislav Petkov, Dimitri Sivanich, Ingo Molnar, Mike Travis, Russ Anderson, stable, x86 The following changes since commit c10fcb14c7afd6688c7b197a814358fecf244222: x86/sysfb_efi: Fix valid BAR address range check (2016-05-05 16:01:00 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent for you to fetch changes up to 6f4c184576aeb5594b8d21f9e7206b7b62e3d96e: x86/efi: Fix 7th argument to efi_call (2016-05-13 21:12:13 +0100) ---------------------------------------------------------------- * Fix passing of 7 parameters or more to efi_call. This issue is only triggered on SGI/UV systems - Alex Thorlton ---------------------------------------------------------------- Alex Thorlton (1): x86/efi: Fix 7th argument to efi_call arch/x86/platform/efi/efi_stub_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] x86/efi: Fix 7th argument to efi_call 2016-05-13 20:34 [GIT PULL] EFI urgent fix Matt Fleming @ 2016-05-13 20:34 ` Matt Fleming 2016-05-16 10:40 ` [tip:efi/urgent] x86/efi: Fix 7th argument to efi_call() tip-bot for Alex Thorlton 0 siblings, 1 reply; 3+ messages in thread From: Matt Fleming @ 2016-05-13 20:34 UTC (permalink / raw) To: Ingo Molnar, Thomas Gleixner, H . Peter Anvin Cc: Alex Thorlton, Ard Biesheuvel, linux-kernel, linux-efi, Matt Fleming, Borislav Petkov, Dimitri Sivanich, Ingo Molnar, Mike Travis, Russ Anderson, stable From: Alex Thorlton <athorlton@sgi.com> The efi_call assembly code has a slight error that prevents us from using arguments 7 and higher, which will be passed in on the stack. mov (%rsp), %rax mov 8(%rax), %rax ... mov %rax, 40(%rsp) This code goes and grabs the return address for the current stack frame, and puts it on the stack, next to the 5th argument for the EFI runtime call. Considering the fact that having the return address in that position on the stack makes no sense, I'm guessing that the intent of this code was actually to grab an argument off the stack frame for this call and place it into the frame for the next one. The small change to that offset (i.e. 8(%rax) to 16(%rax)) ensures that we grab the 7th argument off the stack, and pass it as the 6th argument to the EFI runtime function that we're about to call. This change gets our EFI runtime calls that need to pass more than 6 arguments working again. SGI/UV is the only platform that passes more than 6 arguments. Signed-off-by: Alex Thorlton <athorlton@sgi.com> Cc: Dimitri Sivanich <sivanich@sgi.com> Cc: Russ Anderson <rja@sgi.com> Cc: Mike Travis <travis@sgi.com> Cc: Borislav Petkov <bp@suse.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Cc: linux-efi@vger.kernel.org Cc: <stable@vger.kernel.org> [ Updated changelog. ] Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> --- arch/x86/platform/efi/efi_stub_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/platform/efi/efi_stub_64.S b/arch/x86/platform/efi/efi_stub_64.S index 92723aeae0f9..62938ffbb9f9 100644 --- a/arch/x86/platform/efi/efi_stub_64.S +++ b/arch/x86/platform/efi/efi_stub_64.S @@ -43,7 +43,7 @@ ENTRY(efi_call) FRAME_BEGIN SAVE_XMM mov (%rsp), %rax - mov 8(%rax), %rax + mov 16(%rax), %rax subq $48, %rsp mov %r9, 32(%rsp) mov %rax, 40(%rsp) -- 2.7.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:efi/urgent] x86/efi: Fix 7th argument to efi_call() 2016-05-13 20:34 ` [PATCH] x86/efi: Fix 7th argument to efi_call Matt Fleming @ 2016-05-16 10:40 ` tip-bot for Alex Thorlton 0 siblings, 0 replies; 3+ messages in thread From: tip-bot for Alex Thorlton @ 2016-05-16 10:40 UTC (permalink / raw) To: linux-tip-commits Cc: torvalds, stable, jolsa, bp, alexander.shishkin, vincent.weaver, athorlton, brgerst, mingo, tglx, rja, hpa, bp, eranian, dvlasenk, matt, luto, travis, acme, sivanich, ard.biesheuvel, linux-kernel, peterz Commit-ID: bea23c757f66d91dac8fdadd94da0cba6b0b66bc Gitweb: http://git.kernel.org/tip/bea23c757f66d91dac8fdadd94da0cba6b0b66bc Author: Alex Thorlton <athorlton@sgi.com> AuthorDate: Fri, 13 May 2016 21:34:42 +0100 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Mon, 16 May 2016 12:38:06 +0200 x86/efi: Fix 7th argument to efi_call() The efi_call() assembly code has a slight error that prevents us from using arguments 7 and higher, which will be passed in on the stack: mov (%rsp), %rax mov 8(%rax), %rax ... mov %rax, 40(%rsp) This code goes and grabs the return address for the current stack frame, and puts it on the stack, next to the 5th argument for the EFI runtime call. Considering the fact that having the return address in that position on the stack makes no sense, I'm guessing that the intent of this code was actually to grab an argument off the stack frame for this call and place it into the frame for the next one. The small change to that offset (i.e. 8(%rax) to 16(%rax)) ensures that we grab the 7th argument off the stack, and pass it as the 6th argument to the EFI runtime function that we're about to call. This change gets our EFI runtime calls that need to pass more than 6 arguments working again. SGI/UV is the only platform that passes more than 6 arguments. Signed-off-by: Alex Thorlton <athorlton@sgi.com> [ Updated changelog. ] Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: <stable@vger.kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Dimitri Sivanich <sivanich@sgi.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Travis <travis@sgi.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Russ Anderson <rja@sgi.com> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1463171682-13881-2-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/x86/platform/efi/efi_stub_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/platform/efi/efi_stub_64.S b/arch/x86/platform/efi/efi_stub_64.S index 92723ae..62938ff 100644 --- a/arch/x86/platform/efi/efi_stub_64.S +++ b/arch/x86/platform/efi/efi_stub_64.S @@ -43,7 +43,7 @@ ENTRY(efi_call) FRAME_BEGIN SAVE_XMM mov (%rsp), %rax - mov 8(%rax), %rax + mov 16(%rax), %rax subq $48, %rsp mov %r9, 32(%rsp) mov %rax, 40(%rsp) ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-16 10:41 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-05-13 20:34 [GIT PULL] EFI urgent fix Matt Fleming 2016-05-13 20:34 ` [PATCH] x86/efi: Fix 7th argument to efi_call Matt Fleming 2016-05-16 10:40 ` [tip:efi/urgent] x86/efi: Fix 7th argument to efi_call() tip-bot for Alex Thorlton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).