Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'efi-urgent-for-v5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fix from Ard Biesheuvel via Borislav Petkov:
"Fix an oversight in the handling of EFI_RT_PROPERTIES_TABLE, which was
added v5.10, but failed to take the SetVirtualAddressMap() RT service
into account"

* tag 'efi-urgent-for-v5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
efi: stub: omit SetVirtualAddressMap() if marked unsupported in RT_PROP table

+16
+16
drivers/firmware/efi/libstub/efi-stub.c
··· 96 96 efi_err("Failed to install memreserve config table!\n"); 97 97 } 98 98 99 + static u32 get_supported_rt_services(void) 100 + { 101 + const efi_rt_properties_table_t *rt_prop_table; 102 + u32 supported = EFI_RT_SUPPORTED_ALL; 103 + 104 + rt_prop_table = get_efi_config_table(EFI_RT_PROPERTIES_TABLE_GUID); 105 + if (rt_prop_table) 106 + supported &= rt_prop_table->runtime_services_supported; 107 + 108 + return supported; 109 + } 110 + 99 111 /* 100 112 * EFI entry point for the arm/arm64 EFI stubs. This is the entrypoint 101 113 * that is described in the PE/COFF header. Most of the code is the same ··· 261 249 flat_va_mapping = prop_tbl && 262 250 (prop_tbl->memory_protection_attribute & 263 251 EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA); 252 + 253 + /* force efi_novamap if SetVirtualAddressMap() is unsupported */ 254 + efi_novamap |= !(get_supported_rt_services() & 255 + EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP); 264 256 265 257 /* hibernation expects the runtime regions to stay in the same place */ 266 258 if (!IS_ENABLED(CONFIG_HIBERNATION) && !efi_nokaslr && !flat_va_mapping) {