Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31fce91e authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

Merge remote-tracking branch 'efi/urgent' into x86/urgent



There have been reports of EFI crashes since -rc1. The following two
commits fix known issues.

 * Fix boot failure on 32-bit EFI due to the recent EFI memmap changes
   merged during the merge window - Borislav Petkov

 * Avoid a crash during efi_bgrt_init() by detecting invalid BGRT
   headers based on the 'status' field.

Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parents 4640c7ee 09503379
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 3
PATCHLEVEL = 14
SUBLEVEL = 0
EXTRAVERSION = -rc1
EXTRAVERSION = -rc2
NAME = Shuffling Zombie Juror

# *DOCUMENTATION*
+2 −0
Original line number Diff line number Diff line
@@ -132,6 +132,8 @@ extern void __init efi_map_region_fixed(efi_memory_desc_t *md);
extern void efi_sync_low_kernel_mappings(void);
extern void efi_setup_page_tables(void);
extern void __init old_map_region(efi_memory_desc_t *md);
extern void __init runtime_code_page_mkexec(void);
extern void __init efi_runtime_mkexec(void);

struct efi_setup_data {
	u64 fw_vendor;
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ void __init efi_bgrt_init(void)

	if (bgrt_tab->header.length < sizeof(*bgrt_tab))
		return;
	if (bgrt_tab->version != 1)
	if (bgrt_tab->version != 1 || bgrt_tab->status != 1)
		return;
	if (bgrt_tab->image_type != 0 || !bgrt_tab->image_address)
		return;
+2 −3
Original line number Diff line number Diff line
@@ -792,7 +792,7 @@ void __init efi_set_executable(efi_memory_desc_t *md, bool executable)
		set_memory_nx(addr, npages);
}

static void __init runtime_code_page_mkexec(void)
void __init runtime_code_page_mkexec(void)
{
	efi_memory_desc_t *md;
	void *p;
@@ -1069,8 +1069,7 @@ void __init efi_enter_virtual_mode(void)
	efi.update_capsule = virt_efi_update_capsule;
	efi.query_capsule_caps = virt_efi_query_capsule_caps;

	if (efi_enabled(EFI_OLD_MEMMAP) && (__supported_pte_mask & _PAGE_NX))
		runtime_code_page_mkexec();
	efi_runtime_mkexec();

	kfree(new_memmap);

+6 −0
Original line number Diff line number Diff line
@@ -77,3 +77,9 @@ void efi_call_phys_epilog(void)

	local_irq_restore(efi_rt_eflags);
}

void __init efi_runtime_mkexec(void)
{
	if (__supported_pte_mask & _PAGE_NX)
		runtime_code_page_mkexec();
}
Loading