Re: [PATCH v8 2/4] tpm: of: Make of-tree specific function commonly available

2022-09-01 Thread Jarkko Sakkinen
On Thu, Sep 01, 2022 at 05:46:08PM -0400, Stefan Berger wrote: > 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

[PATCH v8 2/4] tpm: of: Make of-tree specific function commonly available

2022-09-01 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 v8 1/4] drivers: of: kexec ima: Support 32-bit platforms

2022-09-01 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

[PATCH v8 3/4] of: kexec: Refactor IMA buffer related functions to make them reusable

2022-09-01 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 Reviewed-by: Mimi Zohar Reviewed-by: Rob Herring Tested-by: Nageswara R Sastry Tested-by: Coiby Xu --- v6: - Add

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

2022-09-01 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 v8 0/4] tpm: Preserve TPM measurement log across kexec (ppc64)

2022-09-01 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

Re: [PATCH v3] arm64/kexec: Fix missing extra range for crashkres_low.

2022-09-01 Thread Will Deacon
On Wed, 31 Aug 2022 19:39:13 +0900, Levi Yun wrote: > Like crashk_res, Calling crash_exclude_mem_range function with > crashk_low_res area would need extra crash_mem range too. > > Add one more extra cmem slot in case of crashk_low_res is used. > > Applied to arm64 (for-next/fixes), thanks!

Re: [PATCH 1/2] arm64, kdump: enforce to take 4G as the crashkernel low memory end

2022-09-01 Thread Baoquan He
On 09/01/22 at 10:24am, Mike Rapoport wrote: > On Wed, Aug 31, 2022 at 10:29:39PM +0800, Baoquan He wrote: > > On 08/31/22 at 10:37am, Mike Rapoport wrote: > > > On Sun, Aug 28, 2022 at 08:55:44AM +0800, Baoquan He wrote: > > > > > > > > Solution: > > > > = > > > > To fix the problem, we

Re: [PATCH 1/2] arm64, kdump: enforce to take 4G as the crashkernel low memory end

2022-09-01 Thread Mike Rapoport
On Wed, Aug 31, 2022 at 10:29:39PM +0800, Baoquan He wrote: > On 08/31/22 at 10:37am, Mike Rapoport wrote: > > On Sun, Aug 28, 2022 at 08:55:44AM +0800, Baoquan He wrote: > > > > > > Solution: > > > = > > > To fix the problem, we should always take 4G as the crashkernel low > > > memory