Re: [PATCH v9 7/7] x86/crash: Add x86 crash hotplug support

2022-07-07 Thread Eric DeVolder
On 6/20/22 00:06, Sourabh Jain wrote: Hello Eric, On 14/06/22 04:12, Eric DeVolder wrote: For x86_64, when CPU or memory is hot un/plugged, the crash elfcorehdr, which describes the CPUs and memory in the system, must also be updated. When loading the crash kernel via kexec_load or kexec_fil

Re: [PATCH v9 0/7] crash: Kernel handling of CPU and memory hot un/plug

2022-07-07 Thread Eric DeVolder
On 7/5/22 20:16, Baoquan He wrote: On 07/05/22 at 10:17am, Eric DeVolder wrote: Nudge... Thanks! Seems DavidH has concern and rasied it after you posted v9. Is that solved? In looking at David's comments on v8: - [PATCH v8 2/7] crash: prototype change for crash_prepare_elf64_headers I a

Re: [PATCH v9 0/4] unify the keyrings of arm64 and s390 with x86 to verify kexec'ed kernel signature

2022-07-07 Thread Coiby Xu
Hi Mimi, On Wed, Jul 06, 2022 at 10:33:50AM -0400, Mimi Zohar wrote: On Wed, 2022-07-06 at 12:48 +0100, Will Deacon wrote: [..] It looks like this series is ready to go, but it's not clear who should pick it up. Eric -- would you be the best person? Otherwise, I'm happy to take it via the arm6

Re: [PATCH v5 5/6] of: kexec: Refactor IMA buffer related functions to make them reusable

2022-07-07 Thread Stefan Berger
On 7/7/22 10:47, Jonathan McDowell wrote: On Wed, Jul 06, 2022 at 11:23:28AM -0400, Stefan Berger wrote: Refactor IMA buffer related functions to make them reusable for carrying TPM logs across kexec. Signed-off-by: Stefan Berger Cc: Rob Herring Cc: Frank Rowand Cc: Mimi Zohar --- v5:

[PATCH v6 3/6] x86/kexec: Carry forward IMA measurement log on kexec

2022-07-07 Thread Stefan Berger
From: Jonathan McDowell On kexec file load, the Integrity Measurement Architecture (IMA) subsystem may verify the IMA signature of the kernel and initramfs, and measure it. The command line parameters passed to the kernel in the kexec call may also be measured by IMA. A remote attestation servic

[PATCH v6 6/6] tpm/kexec: Duplicate TPM measurement log in of-tree for kexec

2022-07-07 Thread Stefan Berger
The memory area of the TPM measurement log is currently not properly duplicated for carrying it across kexec when an Open Firmware Devicetree is used. Therefore, the contents of the log get corrupted. Fix this for the kexec_file_load() syscall by allocating a buffer and copying the contents of the

[PATCH v6 0/6] tpm: Preserve TPM measurement log across kexec (ppc64)

2022-07-07 Thread Stefan Berger
The of-tree subsystem does not currently preserve the IBM vTPM 1.2 and vTPM 2.0 measurement logs across a kexec on PowerVM and PowerKVM. This series fixes this for the kexec_file_load() syscall using the flattened device tree (fdt) to carry the TPM measurement log's buffer across kexec. Stefan

[PATCH v6 2/6] drivers: of: kexec ima: Support 32-bit platforms

2022-07-07 Thread Stefan Berger
From: Palmer Dabbelt RISC-V recently added kexec_file() support, which uses enables kexec IMA. We're the first 32-bit platform to support this, so we found a build bug. Acked-by: Rob Herring Signed-off-by: Palmer Dabbelt Reviewed-by: Mimi Zohar --- drivers/of/kexec.c | 4 ++-- 1 file change

[PATCH v6 4/6] tpm: of: Make of-tree specific function commonly available

2022-07-07 Thread Stefan Berger
Simplify tpm_read_log_of() by moving reusable parts of the code into an inline function that makes it commonly available so it can be used also for kexec support. Call the new of_tpm_get_sml_parameters() function from the TPM Open Firmware driver. Signed-off-by: Stefan Berger Cc: Jarkko Sakkinen

[PATCH v6 1/6] of: check previous kernel's ima-kexec-buffer against memory bounds

2022-07-07 Thread Stefan Berger
From: Vaibhav Jain Presently ima_get_kexec_buffer() doesn't check if the previous kernel's ima-kexec-buffer lies outside the addressable memory range. This can result in a kernel panic if the new kernel is booted with 'mem=X' arg and the ima-kexec-buffer was allocated beyond that range by the pre

[PATCH v6 5/6] of: kexec: Refactor IMA buffer related functions to make them reusable

2022-07-07 Thread Stefan Berger
Refactor IMA buffer related functions to make them reusable for carrying TPM logs across kexec. Signed-off-by: Stefan Berger Cc: Rob Herring Cc: Frank Rowand Cc: Mimi Zohar --- v6: - Add __init to get_kexec_buffer as suggested by Jonathan v5: - Rebased on Jonathan McDowell's commit "b69a2a

[PATCH] kexec: Replace kmap() with kmap_local_page()

2022-07-07 Thread Fabio M. De Francesco
The use of kmap() and kmap_atomic() are being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mappings are per thread, CPU local and not globally visible. Furthermore, the mappings can be acquired from any context (including interrupts). Therefore, use kmap_local_page() in a

Re: [PATCH v9 0/4] unify the keyrings of arm64 and s390 with x86 to verify kexec'ed kernel signature

2022-07-07 Thread Mimi Zohar
On Thu, 2022-07-07 at 22:10 +0800, Coiby Xu wrote: > Hi Mimi, > > On Wed, Jul 06, 2022 at 10:33:50AM -0400, Mimi Zohar wrote: > >On Wed, 2022-07-06 at 12:48 +0100, Will Deacon wrote: > [..] > >> It looks like this series is ready to go, but it's not clear who should > >> pick it up. Eric -- would

[PATCH] kexec: Replace kmap() with kmap_local_page()

2022-07-07 Thread Fabio M. De Francesco
The use of kmap() and kmap_atomic() are being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mappings are per thread, CPU local and not globally visible. Furthermore, the mappings can be acquired from any context (including interrupts). Therefore, use kmap_local_page() in k

[PATCH v2] kexec: Replace kmap() with kmap_local_page()

2022-07-07 Thread Fabio M. De Francesco
The use of kmap() and kmap_atomic() are being deprecated in favor of kmap_local_page(). With kmap_local_page(), the mappings are per thread, CPU local and not globally visible. Furthermore, the mappings can be acquired from any context (including interrupts). Therefore, use kmap_local_page() in k

Re: [PATCH] kexec: Replace kmap() with kmap_local_page()

2022-07-07 Thread Fabio M. De Francesco
On giovedì 7 luglio 2022 20:49:39 CEST Fabio M. De Francesco wrote: > The use of kmap() and kmap_atomic() are being deprecated in favor of > kmap_local_page(). > > With kmap_local_page(), the mappings are per thread, CPU local and not > globally visible. Furthermore, the mappings can be acquired f

Re: [PATCH] kexec: Replace kmap() with kmap_local_page()

2022-07-07 Thread Fabio M. De Francesco
On venerdì 8 luglio 2022 01:14:12 CEST Fabio M. De Francesco wrote: > The use of kmap() and kmap_atomic() are being deprecated in favor of > kmap_local_page(). > > With kmap_local_page(), the mappings are per thread, CPU local and not > globally visible. Furthermore, the mappings can be acquired f