Skip to content

Commit

Permalink
Merge tag 'efi-urgent-for-v6.7-3' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/efi/efi

Pull EFI fix from Ard Biesheuvel:

 - Ensure that the KASLR load flag is set in boot_params when loading
   the kernel randomized directly from the EFI stub

* tag 'efi-urgent-for-v6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflags
  • Loading branch information
Linus Torvalds committed Jan 3, 2024
2 parents 360f034 + 0163843 commit 94a502e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/firmware/efi/libstub/x86-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,8 @@ static efi_status_t efi_decompress_kernel(unsigned long *kernel_entry)
efi_debug("AMI firmware v2.0 or older detected - disabling physical KASLR\n");
seed[0] = 0;
}

boot_params_ptr->hdr.loadflags |= KASLR_FLAG;
}

status = efi_random_alloc(alloc_size, CONFIG_PHYSICAL_ALIGN, &addr,
Expand Down

0 comments on commit 94a502e

Please sign in to comment.