Skip to content

Commit cf0e371

Browse files
committed
Merge tag 'efi-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI updates from Ard Biesheuvel: - Document what OVMF stands for (Open Virtual Machine Firmware) - Clear NX restrictions also from 'more reliable' type memory when using the DXE service API * tag 'efi-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi/x86: Memory protection on EfiGcdMemoryTypeMoreReliable efi: Explain OVMF acronym in OVMF_DEBUG_LOG help text
2 parents 678074f + 99da5bf commit cf0e371

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

drivers/firmware/efi/Kconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,10 @@ config OVMF_DEBUG_LOG
267267
bool "Expose OVMF firmware debug log via sysfs"
268268
depends on EFI
269269
help
270-
Recent OVMF versions (edk2-stable202508 + newer) can write
271-
their debug log to a memory buffer. This driver exposes the
272-
log content via sysfs (/sys/firmware/efi/ovmf_debug_log).
270+
Recent versions of the Open Virtual Machine Firmware
271+
(edk2-stable202508 + newer) can write their debug log to a memory
272+
buffer. This driver exposes the log content via sysfs
273+
(/sys/firmware/efi/ovmf_debug_log).
273274

274275
config UNACCEPTED_MEMORY
275276
bool

drivers/firmware/efi/libstub/x86-stub.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start,
300300
return EFI_SUCCESS;
301301

302302
/*
303-
* Don't modify memory region attributes, they are
303+
* Don't modify memory region attributes, if they are
304304
* already suitable, to lower the possibility to
305305
* encounter firmware bugs.
306306
*/
@@ -315,11 +315,13 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start,
315315
next = desc.base_address + desc.length;
316316

317317
/*
318-
* Only system memory is suitable for trampoline/kernel image placement,
319-
* so only this type of memory needs its attributes to be modified.
318+
* Only system memory and more reliable memory are suitable for
319+
* trampoline/kernel image placement. So only those memory types
320+
* may need to have attributes modified.
320321
*/
321322

322-
if (desc.gcd_memory_type != EfiGcdMemoryTypeSystemMemory ||
323+
if ((desc.gcd_memory_type != EfiGcdMemoryTypeSystemMemory &&
324+
desc.gcd_memory_type != EfiGcdMemoryTypeMoreReliable) ||
323325
(desc.attributes & (EFI_MEMORY_RO | EFI_MEMORY_XP)) == 0)
324326
continue;
325327

0 commit comments

Comments
 (0)