mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-10 21:35:03 +00:00
In some cases, bootloaders will leave boot_params->cc_blob_address
uninitialized rather than zeroing it out. This field is only meant to be
set by the boot/compressed kernel in order to pass information to the
uncompressed kernel when SEV-SNP support is enabled.
Therefore, there are no cases where the bootloader-provided values
should be treated as anything other than garbage. Otherwise, the
uncompressed kernel may attempt to access this bogus address, leading to
a crash during early boot.
Normally, sanitize_boot_params() would be used to clear out such fields
but that happens too late: sev_enable() may have already initialized
it to a valid value that should not be zeroed out. Instead, have
sev_enable() zero it out unconditionally beforehand.
Also ensure this happens for !CONFIG_AMD_MEM_ENCRYPT as well by also
including this handling in the sev_enable() stub function.
[ bp: Massage commit message and comments. ]
Fixes:
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| acpi.c | ||
| cmdline.c | ||
| cpuflags.c | ||
| early_serial_console.c | ||
| efi_thunk_64.S | ||
| efi.c | ||
| efi.h | ||
| error.c | ||
| error.h | ||
| head_32.S | ||
| head_64.S | ||
| ident_map_64.c | ||
| idt_64.c | ||
| idt_handlers_64.S | ||
| kaslr.c | ||
| kernel_info.S | ||
| Makefile | ||
| mem_encrypt.S | ||
| misc.c | ||
| misc.h | ||
| mkpiggy.c | ||
| pgtable_64.c | ||
| pgtable.h | ||
| sev.c | ||
| string.c | ||
| tdcall.S | ||
| tdx.c | ||
| tdx.h | ||
| vmlinux.lds.S | ||