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-fixes-for-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:

- Fix logic that is supposed to prevent placement of the kernel image
below LOAD_PHYSICAL_ADDR

- Use the firmware stack in the EFI stub when running in mixed mode

- Clear BSS only once when using mixed mode

- Check efi.get_variable() function pointer for NULL before trying to
call it

* tag 'efi-fixes-for-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
efi: fix panic in kdump kernel
x86/efistub: Don't clear BSS twice in mixed mode
x86/efistub: Call mixed mode boot services on the firmware's stack
efi/libstub: fix efi_random_alloc() to allocate memory at alloc_min or higher address

+14 -2
+9
arch/x86/boot/compressed/efi_mixed.S
··· 49 49 lea efi32_boot_args(%rip), %rdx 50 50 mov 0(%rdx), %edi 51 51 mov 4(%rdx), %esi 52 + 53 + /* Switch to the firmware's stack */ 54 + movl efi32_boot_sp(%rip), %esp 55 + andl $~7, %esp 56 + 52 57 #ifdef CONFIG_EFI_HANDOVER_PROTOCOL 53 58 mov 8(%rdx), %edx // saved bootparams pointer 54 59 test %edx, %edx ··· 259 254 /* Store firmware IDT descriptor */ 260 255 sidtl (efi32_boot_idt - 1b)(%ebx) 261 256 257 + /* Store firmware stack pointer */ 258 + movl %esp, (efi32_boot_sp - 1b)(%ebx) 259 + 262 260 /* Store boot arguments */ 263 261 leal (efi32_boot_args - 1b)(%ebx), %ebx 264 262 movl %ecx, 0(%ebx) ··· 326 318 327 319 SYM_DATA_LOCAL(efi32_boot_cs, .word 0) 328 320 SYM_DATA_LOCAL(efi32_boot_ds, .word 0) 321 + SYM_DATA_LOCAL(efi32_boot_sp, .long 0) 329 322 SYM_DATA_LOCAL(efi32_boot_args, .long 0, 0, 0) 330 323 SYM_DATA(efi_is64, .byte 1)
+2
drivers/firmware/efi/efi.c
··· 203 203 204 204 name_size = sizeof(name); 205 205 206 + if (!efi.get_next_variable) 207 + return false; 206 208 status = efi.get_next_variable(&name_size, &name, &guid); 207 209 if (status == EFI_UNSUPPORTED) 208 210 return false;
+1 -1
drivers/firmware/efi/libstub/randomalloc.c
··· 120 120 continue; 121 121 } 122 122 123 - target = round_up(md->phys_addr, align) + target_slot * align; 123 + target = round_up(max(md->phys_addr, alloc_min), align) + target_slot * align; 124 124 pages = size / EFI_PAGE_SIZE; 125 125 126 126 status = efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS,
+2 -1
drivers/firmware/efi/libstub/x86-stub.c
··· 476 476 efi_status_t status; 477 477 char *cmdline_ptr; 478 478 479 - memset(_bss, 0, _ebss - _bss); 479 + if (efi_is_native()) 480 + memset(_bss, 0, _ebss - _bss); 480 481 481 482 efi_system_table = sys_table_arg; 482 483