linux-stable/arch/powerpc/kexec
Russell Currey 91361b5175 powerpc/pseries: Pass PLPKS password on kexec
Before interacting with the PLPKS, we ask the hypervisor to generate a
password for the current boot, which is then required for most further
PLPKS operations.

If we kexec into a new kernel, the new kernel will try and fail to
generate a new password, as the password has already been set.

Pass the password through to the new kernel via the device tree, in
/chosen/ibm,plpks-pw. Check for the presence of this property before
trying to generate a new password - if it exists, use the existing
password and remove it from the device tree.

This only works with the kexec_file_load() syscall, not the older
kexec_load() syscall, however if you're using Secure Boot then you want
to be using kexec_file_load() anyway.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-24-ajd@linux.ibm.com
2023-02-12 22:12:39 +11:00
..
core.c powerpc/64/kdump: Limit kdump base to 512MB 2022-09-28 19:22:09 +10:00
core_32.c powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
core_64.c powerpc: Remove CONFIG_PPC_BOOK3E 2022-09-26 23:00:13 +10:00
crash.c powerpc/crash: save cpu register data in crash_smp_send_stop() 2022-07-28 16:22:13 +10:00
elf_64.c powerpc: If kexec_build_elf_info() fails return immediately from elf64_load() 2021-04-26 16:28:26 -05:00
file_load.c powerpc: Delete unused function delete_fdt_mem_rsv() 2021-03-08 12:06:30 -07:00
file_load_64.c powerpc/pseries: Pass PLPKS password on kexec 2023-02-12 22:12:39 +11:00
Makefile powerpc/kasan: Disable address sanitization in kexec paths 2022-05-22 15:58:29 +10:00
ranges.c kexec: replace crash_mem_range with range 2022-11-18 13:55:07 -08:00
relocate_32.S powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00