From: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
To: X86 ML <x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>,
Matt Fleming
<matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>,
Matthew Garrett <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>,
"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
James Bottomley
<James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>,
Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
fwts-devel-nLRlyDuq1AZFpShjVBNYrg@public.gmane.org
Subject: [PATCH 12/12] EFI: Runtime services virtual mapping
Date: Tue, 8 Oct 2013 18:48:31 +0200 [thread overview]
Message-ID: <20131008164831.GD16793@pd.tnic> (raw)
In-Reply-To: <20131008164551.GB16793-fF5Pk5pvG8Y@public.gmane.org>
From: Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>
We map the EFI regions needed for runtime services contiguously on
virtual addresses starting from -4G down for a total max space of 64G.
This way, we provide for stable runtime services addresses across
kernels so that a kexec'd kernel can still use them.
This way, they're mapped in a separate pagetable so that we don't
pollute the kernel namespace (you can see how the whole ioremapping and
saving and restoring of PGDs is gone now).
Also, add a chicken bit called "efi=old_map" which can be used as a
fallback to the old runtime services mapping method in case there's some
b0rkage with a particular EFI implementation (haha, it is hard to hold
up the sarcasm here...).
Add UEFI RT VA space to Documentation/x86/x86_64/mm.txt, while at it.
Signed-off-by: Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org>
---
Documentation/x86/x86_64/mm.txt | 7 +++
arch/x86/include/asm/efi.h | 47 ++++++++++++-------
arch/x86/include/asm/pgtable_types.h | 3 +-
arch/x86/platform/efi/efi.c | 91 ++++++++++++++++++++++++++----------
arch/x86/platform/efi/efi_32.c | 8 +++-
arch/x86/platform/efi/efi_64.c | 83 ++++++++++++++++++++++++++++++++
arch/x86/platform/efi/efi_stub_64.S | 54 +++++++++++++++++++++
include/linux/efi.h | 1 +
8 files changed, 251 insertions(+), 43 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 881582f75c9c..c584a51add15 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -28,4 +28,11 @@ reference.
Current X86-64 implementations only support 40 bits of address space,
but we support up to 46 bits. This expands into MBZ space in the page tables.
+->trampoline_pgd:
+
+We map EFI runtime services in the aforementioned PGD in the virtual
+range of 64Gb (arbitrarily set, can be raised if needed)
+
+0xffffffef00000000 - 0xffffffff00000000
+
-Andi Kleen, Jul 2004
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index 0062a0125041..c70714447a8f 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -39,6 +39,9 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
#else /* !CONFIG_X86_32 */
+extern u64 efi_va;
+
+#define EFI_VA_END (-68 * (1UL << 30))
#define EFI_LOADER_SIGNATURE "EL64"
extern u64 efi_call0(void *fp);
@@ -69,24 +72,31 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
efi_call6((f), (u64)(a1), (u64)(a2), (u64)(a3), \
(u64)(a4), (u64)(a5), (u64)(a6))
+#define _efi_call_virtX(x, f, ...) \
+({ \
+ efi_status_t __s; \
+ \
+ efi_sync_low_kernel_mappings(); \
+ preempt_disable(); \
+ __s = efi_call##x((void *)efi.systab->runtime->f, __VA_ARGS__); \
+ preempt_enable(); \
+ __s; \
+})
+
#define efi_call_virt0(f) \
- efi_call0((efi.systab->runtime->f))
-#define efi_call_virt1(f, a1) \
- efi_call1((efi.systab->runtime->f), (u64)(a1))
-#define efi_call_virt2(f, a1, a2) \
- efi_call2((efi.systab->runtime->f), (u64)(a1), (u64)(a2))
-#define efi_call_virt3(f, a1, a2, a3) \
- efi_call3((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3))
-#define efi_call_virt4(f, a1, a2, a3, a4) \
- efi_call4((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3), (u64)(a4))
-#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
- efi_call5((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3), (u64)(a4), (u64)(a5))
-#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
- efi_call6((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
+ _efi_call_virtX(0, f)
+#define efi_call_virt1(f, a1) \
+ _efi_call_virtX(1, f, (u64)(a1))
+#define efi_call_virt2(f, a1, a2) \
+ _efi_call_virtX(2, f, (u64)(a1), (u64)(a2))
+#define efi_call_virt3(f, a1, a2, a3) \
+ _efi_call_virtX(3, f, (u64)(a1), (u64)(a2), (u64)(a3))
+#define efi_call_virt4(f, a1, a2, a3, a4) \
+ _efi_call_virtX(4, f, (u64)(a1), (u64)(a2), (u64)(a3), (u64)(a4))
+#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
+ _efi_call_virtX(5, f, (u64)(a1), (u64)(a2), (u64)(a3), (u64)(a4), (u64)(a5))
+#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
+ _efi_call_virtX(6, f, (u64)(a1), (u64)(a2), (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,
u32 type, u64 attribute);
@@ -101,6 +111,9 @@ extern void efi_call_phys_prelog(void);
extern void efi_call_phys_epilog(void);
extern void efi_unmap_memmap(void);
extern void efi_memory_uc(u64 addr, unsigned long size);
+extern void __init efi_map_region(efi_memory_desc_t *md);
+extern void efi_sync_low_kernel_mappings(void);
+extern void __init old_map_region(efi_memory_desc_t *md);
#ifdef CONFIG_EFI
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 0ecac257fb26..a83aa44bb1fb 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -382,7 +382,8 @@ static inline void update_page_count(int level, unsigned long pages) { }
*/
extern pte_t *lookup_address(unsigned long address, unsigned int *level);
extern phys_addr_t slow_virt_to_phys(void *__address);
-
+extern int kernel_map_pages_in_pgd(pgd_t *pgd, u64 pfn, unsigned long address,
+ unsigned numpages, unsigned long page_flags);
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_X86_PGTABLE_DEFS_H */
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 16996aba5012..91d4fac94e67 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -12,6 +12,8 @@
* Bibo Mao <bibo.mao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
* Chandramouli Narayanan <mouli-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
* Huang Ying <ying.huang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
+ * Copyright (C) 2013 SuSE Labs
+ * Borislav Petkov <bp-l3A5Bk7waGM@public.gmane.org> - runtime services VA mapping
*
* Copied from efi_32.c to eliminate the duplicated code between EFI
* 32/64 support code. --ying 2007-10-26
@@ -55,6 +57,12 @@
#define EFI_MIN_RESERVE 5120
+/*
+ * We allocate runtime services regions bottom-up, starting from -4G, i.e.
+ * 0xffff_ffff_0000_0000 and limit EFI VA mapping space to 64G.
+ */
+u64 efi_va = -4 * (1UL << 30);
+
#define EFI_DUMMY_GUID \
EFI_GUID(0x4424ac57, 0xbe4b, 0x47dd, 0x9e, 0x97, 0xed, 0x50, 0xf0, 0x9f, 0x92, 0xa9)
@@ -81,6 +89,17 @@ static efi_system_table_t efi_systab __initdata;
unsigned long x86_efi_facility;
/*
+ * Scratch space used for switching the pagetable in the EFI stub
+ */
+struct efi_scratch {
+ u64 r15;
+ u64 prev_cr3;
+ pgd_t *efi_pgt;
+ bool use_pgd;
+};
+extern struct efi_scratch efi_scratch;
+
+/*
* Returns 1 if 'facility' is enabled, 0 otherwise.
*/
int efi_enabled(int facility)
@@ -851,6 +870,31 @@ void efi_memory_uc(u64 addr, unsigned long size)
set_memory_uc(addr, npages);
}
+void __init old_map_region(efi_memory_desc_t *md)
+{
+ u64 start_pfn, end_pfn, end;
+ unsigned long size;
+ void *va;
+
+ start_pfn = PFN_DOWN(md->phys_addr);
+ size = md->num_pages << PAGE_SHIFT;
+ end = md->phys_addr + size;
+ end_pfn = PFN_UP(end);
+
+ if (pfn_range_is_mapped(start_pfn, end_pfn)) {
+ va = __va(md->phys_addr);
+
+ if (!(md->attribute & EFI_MEMORY_WB))
+ efi_memory_uc((u64)(unsigned long)va, size);
+ } else
+ va = efi_ioremap(md->phys_addr, size,
+ md->type, md->attribute);
+
+ md->virt_addr = (u64) (unsigned long) va;
+ if (!va)
+ pr_err("ioremap of 0x%llX failed!\n",
+ (unsigned long long)md->phys_addr);
+}
/*
* This function will switch the EFI runtime services to virtual mode.
* Essentially, look through the EFI memmap and map every region that
@@ -862,10 +906,10 @@ void efi_memory_uc(u64 addr, unsigned long size)
void __init efi_enter_virtual_mode(void)
{
efi_memory_desc_t *md, *prev_md = NULL;
- efi_status_t status;
+ void *p, *new_memmap = NULL;
unsigned long size;
- u64 end, systab, start_pfn, end_pfn;
- void *p, *va, *new_memmap = NULL;
+ efi_status_t status;
+ u64 end, systab;
int count = 0;
efi.systab = NULL;
@@ -874,7 +918,6 @@ void __init efi_enter_virtual_mode(void)
* We don't do virtual mode, since we don't do runtime services, on
* non-native EFI
*/
-
if (!efi_is_native()) {
efi_unmap_memmap();
return;
@@ -905,6 +948,7 @@ void __init efi_enter_virtual_mode(void)
continue;
}
prev_md = md;
+
}
for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
@@ -914,33 +958,18 @@ void __init efi_enter_virtual_mode(void)
md->type != EFI_BOOT_SERVICES_DATA)
continue;
+ efi_map_region(md);
+
size = md->num_pages << PAGE_SHIFT;
end = md->phys_addr + size;
- start_pfn = PFN_DOWN(md->phys_addr);
- end_pfn = PFN_UP(end);
- if (pfn_range_is_mapped(start_pfn, end_pfn)) {
- va = __va(md->phys_addr);
-
- if (!(md->attribute & EFI_MEMORY_WB))
- efi_memory_uc((u64)(unsigned long)va, size);
- } else
- va = efi_ioremap(md->phys_addr, size,
- md->type, md->attribute);
-
- md->virt_addr = (u64) (unsigned long) va;
-
- if (!va) {
- pr_err("ioremap of 0x%llX failed!\n",
- (unsigned long long)md->phys_addr);
- continue;
- }
-
systab = (u64) (unsigned long) efi_phys.systab;
if (md->phys_addr <= systab && systab < end) {
systab += md->virt_addr - md->phys_addr;
+
efi.systab = (efi_system_table_t *) (unsigned long) systab;
}
+
new_memmap = krealloc(new_memmap,
(count + 1) * memmap.desc_size,
GFP_KERNEL);
@@ -949,8 +978,17 @@ void __init efi_enter_virtual_mode(void)
count++;
}
+#ifdef CONFIG_X86_64
+ efi_scratch.efi_pgt = (pgd_t *)(unsigned long)real_mode_header->trampoline_pgd;
+
+ if (!test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ efi_scratch.use_pgd = true;
+#endif
+
BUG_ON(!efi.systab);
+ efi_sync_low_kernel_mappings();
+
status = phys_efi_set_virtual_address_map(
memmap.desc_size * count,
memmap.desc_size,
@@ -983,7 +1021,9 @@ void __init efi_enter_virtual_mode(void)
efi.query_variable_info = virt_efi_query_variable_info;
efi.update_capsule = virt_efi_update_capsule;
efi.query_capsule_caps = virt_efi_query_capsule_caps;
- if (__supported_pte_mask & _PAGE_NX)
+
+ if (test_bit(EFI_OLD_MEMMAP, &x86_efi_facility) &&
+ (__supported_pte_mask & _PAGE_NX))
runtime_code_page_mkexec();
kfree(new_memmap);
@@ -1119,6 +1159,9 @@ static int __init parse_efi_cmdline(char *str)
if (*str == '=')
str++;
+ if (!strncmp(str, "old_map", 7))
+ set_bit(EFI_OLD_MEMMAP, &x86_efi_facility);
+
return 0;
}
early_param("efi", parse_efi_cmdline);
diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
index 40e446941dd7..6c697a9633f2 100644
--- a/arch/x86/platform/efi/efi_32.c
+++ b/arch/x86/platform/efi/efi_32.c
@@ -37,9 +37,15 @@
* claim EFI runtime service handler exclusively and to duplicate a memory in
* low memory space say 0 - 3G.
*/
-
static unsigned long efi_rt_eflags;
+void efi_sync_low_kernel_mappings(void) {}
+
+void __init efi_map_region(efi_memory_desc_t *md)
+{
+ old_map_region(md);
+}
+
void efi_call_phys_prelog(void)
{
struct desc_ptr gdt_descr;
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 39a0e7f1f0a3..2ee51db337da 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -65,6 +65,9 @@ void __init efi_call_phys_prelog(void)
int pgd;
int n_pgds;
+ if (!test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return;
+
early_code_mapping_set_exec(1);
local_irq_save(efi_flags);
@@ -86,6 +89,10 @@ void __init efi_call_phys_epilog(void)
*/
int pgd;
int n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE);
+
+ if (!test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return;
+
for (pgd = 0; pgd < n_pgds; pgd++)
set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), save_pgd[pgd]);
kfree(save_pgd);
@@ -94,6 +101,82 @@ void __init efi_call_phys_epilog(void)
early_code_mapping_set_exec(0);
}
+/*
+ * Add low kernel mappings for passing arguments to EFI functions.
+ */
+void efi_sync_low_kernel_mappings(void)
+{
+ unsigned num_pgds;
+ pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd);
+
+ if (test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return;
+
+ num_pgds = pgd_index(MODULES_END - 1) - pgd_index(PAGE_OFFSET);
+
+ memcpy(pgd + pgd_index(PAGE_OFFSET),
+ init_mm.pgd + pgd_index(PAGE_OFFSET),
+ sizeof(pgd_t) * num_pgds);
+}
+
+static void __init __map_region(efi_memory_desc_t *md, u64 va)
+{
+ pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd);
+ unsigned long pf = 0, size;
+ u64 end;
+
+ if (!(md->attribute & EFI_MEMORY_WB))
+ pf |= _PAGE_PCD;
+
+ size = md->num_pages << PAGE_SHIFT;
+ end = va + size;
+
+ if(kernel_map_pages_in_pgd(pgd, md->phys_addr, va, md->num_pages, pf))
+ pr_warning("Error mapping PA 0x%llx -> VA 0x%llx!\n",
+ md->phys_addr, va);
+}
+
+void __init efi_map_region(efi_memory_desc_t *md)
+{
+ unsigned long size = md->num_pages << PAGE_SHIFT;
+ u64 pa = md->phys_addr;
+
+ if (test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return old_map_region(md);
+
+ /*
+ * Make sure the 1:1 mappings are present as a catch-all for b0rked
+ * firmware which doesn't update all internal pointers after switching
+ * to virtual mode and would otherwise crap on us.
+ */
+ __map_region(md, md->phys_addr);
+
+ efi_va -= size;
+
+ /* Is PA 2M-aligned? */
+ if (!(pa & (PMD_SIZE - 1)))
+ efi_va &= PMD_MASK;
+ else {
+ u64 pa_offset = pa & (PMD_SIZE - 1);
+ u64 prev_va = efi_va;
+
+ /* get us the same offset within this 2M page */
+ efi_va = (efi_va & PMD_MASK) + pa_offset;
+
+ if (efi_va > prev_va)
+ efi_va -= PMD_SIZE;
+ }
+
+ if (efi_va < EFI_VA_END) {
+ pr_warning(FW_WARN "VA address range overflow!\n");
+ return;
+ }
+
+ /* Do the VA map */
+ __map_region(md, efi_va);
+ md->virt_addr = efi_va;
+}
+
void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
u32 type, u64 attribute)
{
diff --git a/arch/x86/platform/efi/efi_stub_64.S b/arch/x86/platform/efi/efi_stub_64.S
index 4c07ccab8146..88073b140298 100644
--- a/arch/x86/platform/efi/efi_stub_64.S
+++ b/arch/x86/platform/efi/efi_stub_64.S
@@ -34,10 +34,47 @@
mov %rsi, %cr0; \
mov (%rsp), %rsp
+ /* stolen from gcc */
+ .macro FLUSH_TLB_ALL
+ movq %r15, efi_scratch(%rip)
+ movq %r14, efi_scratch+8(%rip)
+ movq %cr4, %r15
+ movq %r15, %r14
+ andb $0x7f, %r14b
+ movq %r14, %cr4
+ movq %r15, %cr4
+ movq efi_scratch+8(%rip), %r14
+ movq efi_scratch(%rip), %r15
+ .endm
+
+ .macro SWITCH_PGT
+ cmpb $0, efi_scratch+24(%rip)
+ je 1f
+ movq %r15, efi_scratch(%rip) # r15
+ # save previous CR3
+ movq %cr3, %r15
+ movq %r15, efi_scratch+8(%rip) # prev_cr3
+ movq efi_scratch+16(%rip), %r15 # EFI pgt
+ movq %r15, %cr3
+ 1:
+ .endm
+
+ .macro RESTORE_PGT
+ cmpb $0, efi_scratch+24(%rip)
+ je 2f
+ movq efi_scratch+8(%rip), %r15
+ movq %r15, %cr3
+ movq efi_scratch(%rip), %r15
+ FLUSH_TLB_ALL
+ 2:
+ .endm
+
ENTRY(efi_call0)
SAVE_XMM
subq $32, %rsp
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -47,7 +84,9 @@ ENTRY(efi_call1)
SAVE_XMM
subq $32, %rsp
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -57,7 +96,9 @@ ENTRY(efi_call2)
SAVE_XMM
subq $32, %rsp
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -68,7 +109,9 @@ ENTRY(efi_call3)
subq $32, %rsp
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -80,7 +123,9 @@ ENTRY(efi_call4)
mov %r8, %r9
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -93,7 +138,9 @@ ENTRY(efi_call5)
mov %r8, %r9
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $48, %rsp
RESTORE_XMM
ret
@@ -109,8 +156,15 @@ ENTRY(efi_call6)
mov %r8, %r9
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $48, %rsp
RESTORE_XMM
ret
ENDPROC(efi_call6)
+
+ .data
+ENTRY(efi_scratch)
+ .fill 3,8,0
+ .byte 0
diff --git a/include/linux/efi.h b/include/linux/efi.h
index fa47d80ab4b5..beff433aa8c0 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -632,6 +632,7 @@ extern int __init efi_setup_pcdp_console(char *);
#define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */
#define EFI_MEMMAP 4 /* Can we use EFI memory map? */
#define EFI_64BIT 5 /* Is the firmware 64-bit? */
+#define EFI_OLD_MEMMAP 6 /* Use old mapping method */
#ifdef CONFIG_EFI
# ifdef CONFIG_X86
--
1.8.4
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <bp@alien8.de>
To: X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Borislav Petkov <bp@suse.de>,
Matt Fleming <matt@console-pimps.org>,
Matthew Garrett <mjg59@srcf.ucam.org>,
"H. Peter Anvin" <hpa@zytor.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Vivek Goyal <vgoyal@redhat.com>, Dave Young <dyoung@redhat.com>,
linux-efi@vger.kernel.org, fwts-devel@lists.ubuntu.com
Subject: [PATCH 12/12] EFI: Runtime services virtual mapping
Date: Tue, 8 Oct 2013 18:48:31 +0200 [thread overview]
Message-ID: <20131008164831.GD16793@pd.tnic> (raw)
In-Reply-To: <20131008164551.GB16793@pd.tnic>
From: Borislav Petkov <bp@suse.de>
We map the EFI regions needed for runtime services contiguously on
virtual addresses starting from -4G down for a total max space of 64G.
This way, we provide for stable runtime services addresses across
kernels so that a kexec'd kernel can still use them.
This way, they're mapped in a separate pagetable so that we don't
pollute the kernel namespace (you can see how the whole ioremapping and
saving and restoring of PGDs is gone now).
Also, add a chicken bit called "efi=old_map" which can be used as a
fallback to the old runtime services mapping method in case there's some
b0rkage with a particular EFI implementation (haha, it is hard to hold
up the sarcasm here...).
Add UEFI RT VA space to Documentation/x86/x86_64/mm.txt, while at it.
Signed-off-by: Borislav Petkov <bp@suse.de>
---
Documentation/x86/x86_64/mm.txt | 7 +++
arch/x86/include/asm/efi.h | 47 ++++++++++++-------
arch/x86/include/asm/pgtable_types.h | 3 +-
arch/x86/platform/efi/efi.c | 91 ++++++++++++++++++++++++++----------
arch/x86/platform/efi/efi_32.c | 8 +++-
arch/x86/platform/efi/efi_64.c | 83 ++++++++++++++++++++++++++++++++
arch/x86/platform/efi/efi_stub_64.S | 54 +++++++++++++++++++++
include/linux/efi.h | 1 +
8 files changed, 251 insertions(+), 43 deletions(-)
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index 881582f75c9c..c584a51add15 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -28,4 +28,11 @@ reference.
Current X86-64 implementations only support 40 bits of address space,
but we support up to 46 bits. This expands into MBZ space in the page tables.
+->trampoline_pgd:
+
+We map EFI runtime services in the aforementioned PGD in the virtual
+range of 64Gb (arbitrarily set, can be raised if needed)
+
+0xffffffef00000000 - 0xffffffff00000000
+
-Andi Kleen, Jul 2004
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index 0062a0125041..c70714447a8f 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -39,6 +39,9 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
#else /* !CONFIG_X86_32 */
+extern u64 efi_va;
+
+#define EFI_VA_END (-68 * (1UL << 30))
#define EFI_LOADER_SIGNATURE "EL64"
extern u64 efi_call0(void *fp);
@@ -69,24 +72,31 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
efi_call6((f), (u64)(a1), (u64)(a2), (u64)(a3), \
(u64)(a4), (u64)(a5), (u64)(a6))
+#define _efi_call_virtX(x, f, ...) \
+({ \
+ efi_status_t __s; \
+ \
+ efi_sync_low_kernel_mappings(); \
+ preempt_disable(); \
+ __s = efi_call##x((void *)efi.systab->runtime->f, __VA_ARGS__); \
+ preempt_enable(); \
+ __s; \
+})
+
#define efi_call_virt0(f) \
- efi_call0((efi.systab->runtime->f))
-#define efi_call_virt1(f, a1) \
- efi_call1((efi.systab->runtime->f), (u64)(a1))
-#define efi_call_virt2(f, a1, a2) \
- efi_call2((efi.systab->runtime->f), (u64)(a1), (u64)(a2))
-#define efi_call_virt3(f, a1, a2, a3) \
- efi_call3((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3))
-#define efi_call_virt4(f, a1, a2, a3, a4) \
- efi_call4((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3), (u64)(a4))
-#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
- efi_call5((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3), (u64)(a4), (u64)(a5))
-#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
- efi_call6((efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
+ _efi_call_virtX(0, f)
+#define efi_call_virt1(f, a1) \
+ _efi_call_virtX(1, f, (u64)(a1))
+#define efi_call_virt2(f, a1, a2) \
+ _efi_call_virtX(2, f, (u64)(a1), (u64)(a2))
+#define efi_call_virt3(f, a1, a2, a3) \
+ _efi_call_virtX(3, f, (u64)(a1), (u64)(a2), (u64)(a3))
+#define efi_call_virt4(f, a1, a2, a3, a4) \
+ _efi_call_virtX(4, f, (u64)(a1), (u64)(a2), (u64)(a3), (u64)(a4))
+#define efi_call_virt5(f, a1, a2, a3, a4, a5) \
+ _efi_call_virtX(5, f, (u64)(a1), (u64)(a2), (u64)(a3), (u64)(a4), (u64)(a5))
+#define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
+ _efi_call_virtX(6, f, (u64)(a1), (u64)(a2), (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,
u32 type, u64 attribute);
@@ -101,6 +111,9 @@ extern void efi_call_phys_prelog(void);
extern void efi_call_phys_epilog(void);
extern void efi_unmap_memmap(void);
extern void efi_memory_uc(u64 addr, unsigned long size);
+extern void __init efi_map_region(efi_memory_desc_t *md);
+extern void efi_sync_low_kernel_mappings(void);
+extern void __init old_map_region(efi_memory_desc_t *md);
#ifdef CONFIG_EFI
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 0ecac257fb26..a83aa44bb1fb 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -382,7 +382,8 @@ static inline void update_page_count(int level, unsigned long pages) { }
*/
extern pte_t *lookup_address(unsigned long address, unsigned int *level);
extern phys_addr_t slow_virt_to_phys(void *__address);
-
+extern int kernel_map_pages_in_pgd(pgd_t *pgd, u64 pfn, unsigned long address,
+ unsigned numpages, unsigned long page_flags);
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_X86_PGTABLE_DEFS_H */
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 16996aba5012..91d4fac94e67 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -12,6 +12,8 @@
* Bibo Mao <bibo.mao@intel.com>
* Chandramouli Narayanan <mouli@linux.intel.com>
* Huang Ying <ying.huang@intel.com>
+ * Copyright (C) 2013 SuSE Labs
+ * Borislav Petkov <bp@suse.de> - runtime services VA mapping
*
* Copied from efi_32.c to eliminate the duplicated code between EFI
* 32/64 support code. --ying 2007-10-26
@@ -55,6 +57,12 @@
#define EFI_MIN_RESERVE 5120
+/*
+ * We allocate runtime services regions bottom-up, starting from -4G, i.e.
+ * 0xffff_ffff_0000_0000 and limit EFI VA mapping space to 64G.
+ */
+u64 efi_va = -4 * (1UL << 30);
+
#define EFI_DUMMY_GUID \
EFI_GUID(0x4424ac57, 0xbe4b, 0x47dd, 0x9e, 0x97, 0xed, 0x50, 0xf0, 0x9f, 0x92, 0xa9)
@@ -81,6 +89,17 @@ static efi_system_table_t efi_systab __initdata;
unsigned long x86_efi_facility;
/*
+ * Scratch space used for switching the pagetable in the EFI stub
+ */
+struct efi_scratch {
+ u64 r15;
+ u64 prev_cr3;
+ pgd_t *efi_pgt;
+ bool use_pgd;
+};
+extern struct efi_scratch efi_scratch;
+
+/*
* Returns 1 if 'facility' is enabled, 0 otherwise.
*/
int efi_enabled(int facility)
@@ -851,6 +870,31 @@ void efi_memory_uc(u64 addr, unsigned long size)
set_memory_uc(addr, npages);
}
+void __init old_map_region(efi_memory_desc_t *md)
+{
+ u64 start_pfn, end_pfn, end;
+ unsigned long size;
+ void *va;
+
+ start_pfn = PFN_DOWN(md->phys_addr);
+ size = md->num_pages << PAGE_SHIFT;
+ end = md->phys_addr + size;
+ end_pfn = PFN_UP(end);
+
+ if (pfn_range_is_mapped(start_pfn, end_pfn)) {
+ va = __va(md->phys_addr);
+
+ if (!(md->attribute & EFI_MEMORY_WB))
+ efi_memory_uc((u64)(unsigned long)va, size);
+ } else
+ va = efi_ioremap(md->phys_addr, size,
+ md->type, md->attribute);
+
+ md->virt_addr = (u64) (unsigned long) va;
+ if (!va)
+ pr_err("ioremap of 0x%llX failed!\n",
+ (unsigned long long)md->phys_addr);
+}
/*
* This function will switch the EFI runtime services to virtual mode.
* Essentially, look through the EFI memmap and map every region that
@@ -862,10 +906,10 @@ void efi_memory_uc(u64 addr, unsigned long size)
void __init efi_enter_virtual_mode(void)
{
efi_memory_desc_t *md, *prev_md = NULL;
- efi_status_t status;
+ void *p, *new_memmap = NULL;
unsigned long size;
- u64 end, systab, start_pfn, end_pfn;
- void *p, *va, *new_memmap = NULL;
+ efi_status_t status;
+ u64 end, systab;
int count = 0;
efi.systab = NULL;
@@ -874,7 +918,6 @@ void __init efi_enter_virtual_mode(void)
* We don't do virtual mode, since we don't do runtime services, on
* non-native EFI
*/
-
if (!efi_is_native()) {
efi_unmap_memmap();
return;
@@ -905,6 +948,7 @@ void __init efi_enter_virtual_mode(void)
continue;
}
prev_md = md;
+
}
for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
@@ -914,33 +958,18 @@ void __init efi_enter_virtual_mode(void)
md->type != EFI_BOOT_SERVICES_DATA)
continue;
+ efi_map_region(md);
+
size = md->num_pages << PAGE_SHIFT;
end = md->phys_addr + size;
- start_pfn = PFN_DOWN(md->phys_addr);
- end_pfn = PFN_UP(end);
- if (pfn_range_is_mapped(start_pfn, end_pfn)) {
- va = __va(md->phys_addr);
-
- if (!(md->attribute & EFI_MEMORY_WB))
- efi_memory_uc((u64)(unsigned long)va, size);
- } else
- va = efi_ioremap(md->phys_addr, size,
- md->type, md->attribute);
-
- md->virt_addr = (u64) (unsigned long) va;
-
- if (!va) {
- pr_err("ioremap of 0x%llX failed!\n",
- (unsigned long long)md->phys_addr);
- continue;
- }
-
systab = (u64) (unsigned long) efi_phys.systab;
if (md->phys_addr <= systab && systab < end) {
systab += md->virt_addr - md->phys_addr;
+
efi.systab = (efi_system_table_t *) (unsigned long) systab;
}
+
new_memmap = krealloc(new_memmap,
(count + 1) * memmap.desc_size,
GFP_KERNEL);
@@ -949,8 +978,17 @@ void __init efi_enter_virtual_mode(void)
count++;
}
+#ifdef CONFIG_X86_64
+ efi_scratch.efi_pgt = (pgd_t *)(unsigned long)real_mode_header->trampoline_pgd;
+
+ if (!test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ efi_scratch.use_pgd = true;
+#endif
+
BUG_ON(!efi.systab);
+ efi_sync_low_kernel_mappings();
+
status = phys_efi_set_virtual_address_map(
memmap.desc_size * count,
memmap.desc_size,
@@ -983,7 +1021,9 @@ void __init efi_enter_virtual_mode(void)
efi.query_variable_info = virt_efi_query_variable_info;
efi.update_capsule = virt_efi_update_capsule;
efi.query_capsule_caps = virt_efi_query_capsule_caps;
- if (__supported_pte_mask & _PAGE_NX)
+
+ if (test_bit(EFI_OLD_MEMMAP, &x86_efi_facility) &&
+ (__supported_pte_mask & _PAGE_NX))
runtime_code_page_mkexec();
kfree(new_memmap);
@@ -1119,6 +1159,9 @@ static int __init parse_efi_cmdline(char *str)
if (*str == '=')
str++;
+ if (!strncmp(str, "old_map", 7))
+ set_bit(EFI_OLD_MEMMAP, &x86_efi_facility);
+
return 0;
}
early_param("efi", parse_efi_cmdline);
diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
index 40e446941dd7..6c697a9633f2 100644
--- a/arch/x86/platform/efi/efi_32.c
+++ b/arch/x86/platform/efi/efi_32.c
@@ -37,9 +37,15 @@
* claim EFI runtime service handler exclusively and to duplicate a memory in
* low memory space say 0 - 3G.
*/
-
static unsigned long efi_rt_eflags;
+void efi_sync_low_kernel_mappings(void) {}
+
+void __init efi_map_region(efi_memory_desc_t *md)
+{
+ old_map_region(md);
+}
+
void efi_call_phys_prelog(void)
{
struct desc_ptr gdt_descr;
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 39a0e7f1f0a3..2ee51db337da 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -65,6 +65,9 @@ void __init efi_call_phys_prelog(void)
int pgd;
int n_pgds;
+ if (!test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return;
+
early_code_mapping_set_exec(1);
local_irq_save(efi_flags);
@@ -86,6 +89,10 @@ void __init efi_call_phys_epilog(void)
*/
int pgd;
int n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE);
+
+ if (!test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return;
+
for (pgd = 0; pgd < n_pgds; pgd++)
set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), save_pgd[pgd]);
kfree(save_pgd);
@@ -94,6 +101,82 @@ void __init efi_call_phys_epilog(void)
early_code_mapping_set_exec(0);
}
+/*
+ * Add low kernel mappings for passing arguments to EFI functions.
+ */
+void efi_sync_low_kernel_mappings(void)
+{
+ unsigned num_pgds;
+ pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd);
+
+ if (test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return;
+
+ num_pgds = pgd_index(MODULES_END - 1) - pgd_index(PAGE_OFFSET);
+
+ memcpy(pgd + pgd_index(PAGE_OFFSET),
+ init_mm.pgd + pgd_index(PAGE_OFFSET),
+ sizeof(pgd_t) * num_pgds);
+}
+
+static void __init __map_region(efi_memory_desc_t *md, u64 va)
+{
+ pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd);
+ unsigned long pf = 0, size;
+ u64 end;
+
+ if (!(md->attribute & EFI_MEMORY_WB))
+ pf |= _PAGE_PCD;
+
+ size = md->num_pages << PAGE_SHIFT;
+ end = va + size;
+
+ if(kernel_map_pages_in_pgd(pgd, md->phys_addr, va, md->num_pages, pf))
+ pr_warning("Error mapping PA 0x%llx -> VA 0x%llx!\n",
+ md->phys_addr, va);
+}
+
+void __init efi_map_region(efi_memory_desc_t *md)
+{
+ unsigned long size = md->num_pages << PAGE_SHIFT;
+ u64 pa = md->phys_addr;
+
+ if (test_bit(EFI_OLD_MEMMAP, &x86_efi_facility))
+ return old_map_region(md);
+
+ /*
+ * Make sure the 1:1 mappings are present as a catch-all for b0rked
+ * firmware which doesn't update all internal pointers after switching
+ * to virtual mode and would otherwise crap on us.
+ */
+ __map_region(md, md->phys_addr);
+
+ efi_va -= size;
+
+ /* Is PA 2M-aligned? */
+ if (!(pa & (PMD_SIZE - 1)))
+ efi_va &= PMD_MASK;
+ else {
+ u64 pa_offset = pa & (PMD_SIZE - 1);
+ u64 prev_va = efi_va;
+
+ /* get us the same offset within this 2M page */
+ efi_va = (efi_va & PMD_MASK) + pa_offset;
+
+ if (efi_va > prev_va)
+ efi_va -= PMD_SIZE;
+ }
+
+ if (efi_va < EFI_VA_END) {
+ pr_warning(FW_WARN "VA address range overflow!\n");
+ return;
+ }
+
+ /* Do the VA map */
+ __map_region(md, efi_va);
+ md->virt_addr = efi_va;
+}
+
void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
u32 type, u64 attribute)
{
diff --git a/arch/x86/platform/efi/efi_stub_64.S b/arch/x86/platform/efi/efi_stub_64.S
index 4c07ccab8146..88073b140298 100644
--- a/arch/x86/platform/efi/efi_stub_64.S
+++ b/arch/x86/platform/efi/efi_stub_64.S
@@ -34,10 +34,47 @@
mov %rsi, %cr0; \
mov (%rsp), %rsp
+ /* stolen from gcc */
+ .macro FLUSH_TLB_ALL
+ movq %r15, efi_scratch(%rip)
+ movq %r14, efi_scratch+8(%rip)
+ movq %cr4, %r15
+ movq %r15, %r14
+ andb $0x7f, %r14b
+ movq %r14, %cr4
+ movq %r15, %cr4
+ movq efi_scratch+8(%rip), %r14
+ movq efi_scratch(%rip), %r15
+ .endm
+
+ .macro SWITCH_PGT
+ cmpb $0, efi_scratch+24(%rip)
+ je 1f
+ movq %r15, efi_scratch(%rip) # r15
+ # save previous CR3
+ movq %cr3, %r15
+ movq %r15, efi_scratch+8(%rip) # prev_cr3
+ movq efi_scratch+16(%rip), %r15 # EFI pgt
+ movq %r15, %cr3
+ 1:
+ .endm
+
+ .macro RESTORE_PGT
+ cmpb $0, efi_scratch+24(%rip)
+ je 2f
+ movq efi_scratch+8(%rip), %r15
+ movq %r15, %cr3
+ movq efi_scratch(%rip), %r15
+ FLUSH_TLB_ALL
+ 2:
+ .endm
+
ENTRY(efi_call0)
SAVE_XMM
subq $32, %rsp
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -47,7 +84,9 @@ ENTRY(efi_call1)
SAVE_XMM
subq $32, %rsp
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -57,7 +96,9 @@ ENTRY(efi_call2)
SAVE_XMM
subq $32, %rsp
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -68,7 +109,9 @@ ENTRY(efi_call3)
subq $32, %rsp
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -80,7 +123,9 @@ ENTRY(efi_call4)
mov %r8, %r9
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $32, %rsp
RESTORE_XMM
ret
@@ -93,7 +138,9 @@ ENTRY(efi_call5)
mov %r8, %r9
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $48, %rsp
RESTORE_XMM
ret
@@ -109,8 +156,15 @@ ENTRY(efi_call6)
mov %r8, %r9
mov %rcx, %r8
mov %rsi, %rcx
+ SWITCH_PGT
call *%rdi
+ RESTORE_PGT
addq $48, %rsp
RESTORE_XMM
ret
ENDPROC(efi_call6)
+
+ .data
+ENTRY(efi_scratch)
+ .fill 3,8,0
+ .byte 0
diff --git a/include/linux/efi.h b/include/linux/efi.h
index fa47d80ab4b5..beff433aa8c0 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -632,6 +632,7 @@ extern int __init efi_setup_pcdp_console(char *);
#define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */
#define EFI_MEMMAP 4 /* Can we use EFI memory map? */
#define EFI_64BIT 5 /* Is the firmware 64-bit? */
+#define EFI_OLD_MEMMAP 6 /* Use old mapping method */
#ifdef CONFIG_EFI
# ifdef CONFIG_X86
--
1.8.4
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-10-08 16:48 UTC|newest]
Thread overview: 182+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 14:54 [PATCH 00/11] EFI runtime services virtual mapping Borislav Petkov
[not found] ` <1379602494-26684-1-git-send-email-bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
2013-09-19 14:54 ` [PATCH 01/11] efi: Simplify EFI_DEBUG Borislav Petkov
2013-09-19 14:54 ` Borislav Petkov
2013-09-19 14:54 ` [PATCH 02/11] efi: Remove EFI_PAGE_SHIFT and EFI_PAGE_SIZE Borislav Petkov
2013-09-19 14:54 ` Borislav Petkov
[not found] ` <1379602494-26684-3-git-send-email-bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
2013-09-20 10:42 ` Matt Fleming
2013-09-20 10:42 ` Matt Fleming
2013-09-21 15:21 ` Leif Lindholm
2013-09-21 15:41 ` Borislav Petkov
2013-09-21 15:50 ` Borislav Petkov
2013-09-21 16:01 ` Leif Lindholm
[not found] ` <20130921160121.GI2737-GZEopFhza0F985/tl1ce8aaDwS/vmuI7@public.gmane.org>
2013-09-21 16:03 ` Borislav Petkov
2013-09-21 16:03 ` Borislav Petkov
[not found] ` <20130921154143.GC1587-fF5Pk5pvG8Y@public.gmane.org>
2013-09-21 15:59 ` Leif Lindholm
2013-09-21 15:59 ` Leif Lindholm
2013-09-19 14:54 ` [PATCH 05/11] x86, pageattr: Add a PUD pagetable populating function Borislav Petkov
2013-09-19 14:54 ` Borislav Petkov
2013-09-19 14:54 ` [PATCH 09/11] x86, pageattr: Add last levels of error path Borislav Petkov
2013-09-19 14:54 ` Borislav Petkov
2013-09-20 7:29 ` [PATCH 00/11] EFI runtime services virtual mapping Dave Young
2013-09-20 7:29 ` Dave Young
[not found] ` <20130920072904.GA21922-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-20 8:19 ` Dave Young
2013-09-20 8:19 ` Dave Young
[not found] ` <20130920081940.GC21922-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-20 9:33 ` Borislav Petkov
2013-09-20 9:33 ` Borislav Petkov
2013-09-20 10:07 ` Dave Young
2013-09-20 9:05 ` Borislav Petkov
2013-09-20 9:05 ` Borislav Petkov
[not found] ` <20130920090544.GA9574-fF5Pk5pvG8Y@public.gmane.org>
2013-09-20 9:44 ` Matt Fleming
2013-09-20 9:44 ` Matt Fleming
2013-09-20 9:49 ` Matt Fleming
2013-09-20 9:49 ` Matt Fleming
[not found] ` <20130920094913.GG4785-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-09-20 10:02 ` Borislav Petkov
2013-09-20 10:02 ` Borislav Petkov
2013-09-20 11:51 ` Dave Young
2013-09-20 11:51 ` Dave Young
2013-09-20 12:29 ` Matt Fleming
2013-09-20 12:29 ` Matt Fleming
[not found] ` <20130920122915.GB21381-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-09-20 14:04 ` Dave Young
2013-09-20 14:04 ` Dave Young
2013-09-19 14:54 ` [PATCH 03/11] x86, pageattr: Lookup address in an arbitrary PGD Borislav Petkov
2013-09-19 14:54 ` [PATCH 04/11] x86, pageattr: Add a PGD pagetable populating function Borislav Petkov
2013-09-19 14:54 ` [PATCH 06/11] x86, pageattr: Add a PMD " Borislav Petkov
2013-09-19 14:54 ` [PATCH 07/11] x86, pageattr: Add a PTE " Borislav Petkov
2013-09-19 14:54 ` [PATCH 08/11] x86, pageattr: Add a PUD error unwinding path Borislav Petkov
2013-09-19 14:54 ` [PATCH 10/11] x86, cpa: Map in an arbitrary pgd Borislav Petkov
2013-09-19 14:54 ` [PATCH 11/11] EFI: Runtime services virtual mapping Borislav Petkov
[not found] ` <1379602494-26684-12-git-send-email-bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
2013-09-21 11:39 ` [PATCH -v2] " Borislav Petkov
2013-09-21 11:39 ` Borislav Petkov
2013-09-23 5:47 ` Dave Young
[not found] ` <20130923054741.GC7007-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-23 6:29 ` Borislav Petkov
2013-09-23 6:29 ` Borislav Petkov
[not found] ` <20130923062947.GA2527-fF5Pk5pvG8Y@public.gmane.org>
2013-09-23 7:08 ` Dave Young
2013-09-23 7:08 ` Dave Young
[not found] ` <20130921113929.GB1587-fF5Pk5pvG8Y@public.gmane.org>
2013-09-22 12:35 ` Dave Young
2013-09-22 12:35 ` Dave Young
[not found] ` <20130922123515.GA7476-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-22 13:37 ` Borislav Petkov
2013-09-22 13:37 ` Borislav Petkov
[not found] ` <20130922133722.GC28718-fF5Pk5pvG8Y@public.gmane.org>
2013-09-22 14:00 ` Dave Young
2013-09-22 14:00 ` Dave Young
[not found] ` <20130922140038.GB7476-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-22 14:31 ` Dave Young
2013-09-22 14:31 ` Dave Young
2013-09-22 15:27 ` H. Peter Anvin
2013-09-22 15:27 ` H. Peter Anvin
[not found] ` <1ba7eca6-419c-4181-9927-9ba0927a6abf-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2013-09-22 16:38 ` Borislav Petkov
2013-09-22 16:38 ` Borislav Petkov
2013-09-23 5:45 ` Dave Young
2013-09-23 5:45 ` Dave Young
2013-09-24 2:52 ` Dave Young
2013-09-24 2:52 ` Dave Young
[not found] ` <20130924025209.GA5561-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-24 3:06 ` H. Peter Anvin
2013-09-24 3:06 ` H. Peter Anvin
[not found] ` <2d27a1bc-eabf-4d45-8303-27ae58511b11-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2013-09-24 4:57 ` Dave Young
2013-09-24 4:57 ` Dave Young
[not found] ` <20130924045705.GB5561-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-24 4:58 ` Dave Young
2013-09-24 4:58 ` Dave Young
[not found] ` <20130924045818.GC5561-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-09-24 5:23 ` Dave Young
2013-09-24 5:23 ` Dave Young
2013-09-24 8:57 ` Dave Young
2013-09-24 9:43 ` Borislav Petkov
2013-09-24 9:43 ` Borislav Petkov
[not found] ` <bd9528a453bce9b52ad4be75dcc0f034.squirrel-Fq0NhQX/+7ild1e1puMNDg@public.gmane.org>
2013-09-24 10:01 ` Dave Young
2013-09-24 10:01 ` Dave Young
2013-09-24 12:45 ` Dave Young
2013-09-24 12:45 ` Dave Young
2013-10-02 10:04 ` Borislav Petkov
2013-10-02 10:04 ` Borislav Petkov
[not found] ` <20131002100426.GB20568-fF5Pk5pvG8Y@public.gmane.org>
2013-10-02 15:43 ` H. Peter Anvin
2013-10-02 15:43 ` H. Peter Anvin
[not found] ` <524C3F38.6050507-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-10-02 17:05 ` Borislav Petkov
2013-10-02 17:05 ` Borislav Petkov
[not found] ` <20131002170522.GA20647-fF5Pk5pvG8Y@public.gmane.org>
2013-10-02 17:32 ` H. Peter Anvin
2013-10-02 17:32 ` H. Peter Anvin
[not found] ` <524C58A3.4090704-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-10-02 18:42 ` Borislav Petkov
2013-10-02 18:42 ` Borislav Petkov
[not found] ` <20131002184229.GE20568-fF5Pk5pvG8Y@public.gmane.org>
2013-10-02 18:46 ` H. Peter Anvin
2013-10-02 18:46 ` H. Peter Anvin
[not found] ` <524C6A14.40905-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-10-04 9:42 ` Borislav Petkov
2013-10-04 9:42 ` Borislav Petkov
[not found] ` <20131004094247.GA6796-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2013-10-04 14:43 ` H. Peter Anvin
2013-10-04 14:43 ` H. Peter Anvin
[not found] ` <89e0284e-89b5-42ad-8120-128ef1bf0152-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2013-10-04 14:50 ` Borislav Petkov
2013-10-04 14:50 ` Borislav Petkov
2013-09-23 8:45 ` Borislav Petkov
2013-09-23 8:45 ` Borislav Petkov
2013-09-25 9:24 ` Borislav Petkov
2013-09-25 9:24 ` Borislav Petkov
2013-10-08 16:45 ` [PATCH 00/11] EFI runtime " Borislav Petkov
[not found] ` <20131008164551.GB16793-fF5Pk5pvG8Y@public.gmane.org>
2013-10-08 16:47 ` [PATCH 11/12] efi: Add an efi= kernel command line parameter Borislav Petkov
2013-10-08 16:47 ` Borislav Petkov
2013-10-28 11:02 ` Matt Fleming
2013-10-28 11:10 ` Borislav Petkov
2013-10-08 16:48 ` Borislav Petkov [this message]
2013-10-08 16:48 ` [PATCH 12/12] EFI: Runtime services virtual mapping Borislav Petkov
[not found] ` <20131008164831.GD16793-fF5Pk5pvG8Y@public.gmane.org>
2013-10-10 8:06 ` Dave Young
2013-10-10 8:06 ` Dave Young
2013-10-10 8:14 ` Dave Young
[not found] ` <20131010081434.GB3692-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-10 8:58 ` Borislav Petkov
2013-10-10 8:58 ` Borislav Petkov
[not found] ` <20131010085827.GA9929-fF5Pk5pvG8Y@public.gmane.org>
2013-10-10 12:34 ` Matt Fleming
2013-10-10 12:34 ` Matt Fleming
[not found] ` <20131010123453.GA12321-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-10-11 6:24 ` Dave Young
2013-10-11 6:24 ` Dave Young
[not found] ` <20131011062437.GA14115-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-11 7:41 ` Borislav Petkov
2013-10-11 7:41 ` Borislav Petkov
[not found] ` <20131011074144.GA18719-fF5Pk5pvG8Y@public.gmane.org>
2013-10-12 7:54 ` Dave Young
2013-10-12 7:54 ` Dave Young
[not found] ` <20131012075443.GD7550-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-12 10:13 ` Matt Fleming
2013-10-12 10:13 ` Matt Fleming
[not found] ` <20131012101308.GI12321-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-10-12 10:30 ` Borislav Petkov
2013-10-12 10:30 ` Borislav Petkov
[not found] ` <20131012103054.GA13739-fF5Pk5pvG8Y@public.gmane.org>
2013-10-13 3:11 ` Dave Young
2013-10-13 3:11 ` Dave Young
[not found] ` <20131013031126.GB1914-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
2013-10-13 9:25 ` Borislav Petkov
2013-10-13 9:25 ` Borislav Petkov
[not found] ` <20131013092521.GA22866-fF5Pk5pvG8Y@public.gmane.org>
2013-10-14 15:58 ` Borislav Petkov
2013-10-14 15:58 ` Borislav Petkov
[not found] ` <20131014155851.GJ4009-fF5Pk5pvG8Y@public.gmane.org>
2013-10-21 12:47 ` Dave Young
2013-10-21 12:47 ` Dave Young
[not found] ` <20131021124739.GA4515-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-21 13:37 ` Borislav Petkov
2013-10-21 13:37 ` Borislav Petkov
[not found] ` <20131021133741.GA5716-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2013-10-21 15:04 ` Dave Young
2013-10-21 15:04 ` Dave Young
[not found] ` <20131021150426.GB4515-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-22 11:18 ` Borislav Petkov
2013-10-22 11:18 ` Borislav Petkov
[not found] ` <20131022111857.GA10660-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2013-10-23 2:17 ` Dave Young
2013-10-23 2:17 ` Dave Young
[not found] ` <20131023021730.GE4594-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-23 12:25 ` Borislav Petkov
2013-10-23 12:25 ` Borislav Petkov
[not found] ` <20131023122531.GA15848-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2013-10-23 12:37 ` Matthew Garrett
2013-10-23 12:37 ` Matthew Garrett
2013-10-23 12:51 ` Dave Young
2013-10-23 12:51 ` Dave Young
[not found] ` <20131023125131.GA5552-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-23 13:11 ` Borislav Petkov
2013-10-23 13:11 ` Borislav Petkov
2013-10-26 15:50 ` Matt Fleming
2013-10-26 15:50 ` Matt Fleming
2013-10-13 3:06 ` Dave Young
2013-10-11 10:27 ` Matt Fleming
2013-10-11 10:27 ` Matt Fleming
[not found] ` <20131011102706.GE12321-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-10-11 13:42 ` Dave Young
2013-10-11 13:42 ` Dave Young
[not found] ` <643121905.4545046.1381498954428.JavaMail.root-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-12 2:14 ` Dave Young
2013-10-12 2:14 ` Dave Young
2013-10-14 15:57 ` Peter Jones
2013-10-16 6:27 ` Dave Young
2013-10-28 11:22 ` Matt Fleming
2013-10-28 11:22 ` Matt Fleming
[not found] ` <20131028112246.GK1982-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-10-28 16:00 ` Borislav Petkov
2013-10-28 16:00 ` Borislav Petkov
2013-10-29 6:47 ` Dave Young
2013-10-29 6:47 ` Dave Young
[not found] ` <20131029064720.GA16009-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-29 9:40 ` Borislav Petkov
2013-10-29 9:40 ` Borislav Petkov
[not found] ` <20131029094033.GA10972-fF5Pk5pvG8Y@public.gmane.org>
2013-10-30 9:32 ` Dave Young
2013-10-30 9:32 ` Dave Young
[not found] ` <20131030093227.GA5791-je1gSBvt1TcFLmT5oZ11vB/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2013-10-30 10:45 ` Borislav Petkov
2013-10-30 10:45 ` Borislav Petkov
[not found] ` <20131030104526.GA13290-fF5Pk5pvG8Y@public.gmane.org>
2013-10-31 7:07 ` Dave Young
2013-10-31 7:07 ` Dave Young
2013-10-14 13:04 ` [PATCH 00/11] EFI runtime " Matt Fleming
2013-10-14 13:04 ` Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131008164831.GD16793@pd.tnic \
--to=bp-gina5biwoiwzqb+pc5nmwq@public.gmane.org \
--cc=James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
--cc=bp-l3A5Bk7waGM@public.gmane.org \
--cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=fwts-devel-nLRlyDuq1AZFpShjVBNYrg@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
--cc=mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org \
--cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.