Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607041 > unrolled thread

[PATCH 3/7] x86/efi/32: Fix EFI on systems where the percpu GDT is virtually mapped

Started byAndy Lutomirski <luto@kernel.org>
First post2017-03-22 22:40 +0100
Last post2017-03-23 10:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/7] x86/efi/32: Fix EFI on systems where the percpu GDT is virtually mapped Andy Lutomirski <luto@kernel.org> - 2017-03-22 22:40 +0100
    [tip:x86/mm] x86/efi/32: Fix EFI on systems where the per-cpu GDT  is virtually mapped tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2017-03-23 10:30 +0100

#1607041 — [PATCH 3/7] x86/efi/32: Fix EFI on systems where the percpu GDT is virtually mapped

FromAndy Lutomirski <luto@kernel.org>
Date2017-03-22 22:40 +0100
Subject[PATCH 3/7] x86/efi/32: Fix EFI on systems where the percpu GDT is virtually mapped
Message-ID<tnW93-v1-23@gated-at.bofh.it>
__pa on a percpu pointer is invalid.  This bug appears to go *waaay*
back, and I guess it's just never been triggered.

Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-efi@vger.kernel.org
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 arch/x86/platform/efi/efi_32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
index 950071171436..3481268da3d0 100644
--- a/arch/x86/platform/efi/efi_32.c
+++ b/arch/x86/platform/efi/efi_32.c
@@ -68,7 +68,7 @@ pgd_t * __init efi_call_phys_prolog(void)
 	load_cr3(initial_page_table);
 	__flush_tlb_all();
 
-	gdt_descr.address = __pa(get_cpu_gdt_rw(0));
+	gdt_descr.address = get_cpu_gdt_paddr(0);
 	gdt_descr.size = GDT_SIZE - 1;
 	load_gdt(&gdt_descr);
 
-- 
2.9.3

[toc] | [next] | [standalone]


#1607289 — [tip:x86/mm] x86/efi/32: Fix EFI on systems where the per-cpu GDT is virtually mapped

Fromtip-bot for Andy Lutomirski <tipbot@zytor.com>
Date2017-03-23 10:30 +0100
Subject[tip:x86/mm] x86/efi/32: Fix EFI on systems where the per-cpu GDT is virtually mapped
Message-ID<to7ea-eW-11@gated-at.bofh.it>
In reply to#1607041
Commit-ID:  3fa1cabbc3b61224ef33d3ca4a1a96998529bc68
Gitweb:     http://git.kernel.org/tip/3fa1cabbc3b61224ef33d3ca4a1a96998529bc68
Author:     Andy Lutomirski <luto@kernel.org>
AuthorDate: Wed, 22 Mar 2017 14:32:31 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 23 Mar 2017 08:25:07 +0100

x86/efi/32: Fix EFI on systems where the per-cpu GDT is virtually mapped

__pa() on a per-cpu pointer is invalid.  This bug appears to go *waaay*
back, and I guess it's just never been triggered.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Garnier <thgarnie@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/5ba1d3ffca85e1a5b3ac99265ebe55df4cf0dbe4.1490218061.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/efi/efi_32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
index 9500711..3481268 100644
--- a/arch/x86/platform/efi/efi_32.c
+++ b/arch/x86/platform/efi/efi_32.c
@@ -68,7 +68,7 @@ pgd_t * __init efi_call_phys_prolog(void)
 	load_cr3(initial_page_table);
 	__flush_tlb_all();
 
-	gdt_descr.address = __pa(get_cpu_gdt_rw(0));
+	gdt_descr.address = get_cpu_gdt_paddr(0);
 	gdt_descr.size = GDT_SIZE - 1;
 	load_gdt(&gdt_descr);
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web