Re: [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver

2022-06-28 Thread Jarkko Sakkinen
On Tue, Jun 28, 2022 at 09:29:48AM -0400, Stefan Berger wrote: > > > On 6/27/22 18:43, Rob Herring wrote: > > On Thu, Jun 16, 2022 at 11:41:28AM -0400, Stefan Berger wrote: > > > Simplify tpm_read_log_of() by moving Openfirmware-specific code into > > > the Openfirmware driver to make the code

Re: [PATCHv7 11/14] x86: Disable kexec if system has unaccepted memory

2022-06-28 Thread Kirill A. Shutemov
On Tue, Jun 28, 2022 at 05:10:56PM -0700, Dave Hansen wrote: > On 6/28/22 16:51, Kirill A. Shutemov wrote: > > On Fri, Jun 24, 2022 at 05:00:05AM +0300, Kirill A. Shutemov wrote: > >>> If there is some deep and fundamental why this can not be supported > >>> then it probably makes sense to put

Re: [PATCHv7 11/14] x86: Disable kexec if system has unaccepted memory

2022-06-28 Thread Dave Hansen
On 6/28/22 16:51, Kirill A. Shutemov wrote: > On Fri, Jun 24, 2022 at 05:00:05AM +0300, Kirill A. Shutemov wrote: >>> If there is some deep and fundamental why this can not be supported >>> then it probably makes sense to put some code in the arch_kexec_load >>> hook that verifies that deep and

Re: [PATCHv7 11/14] x86: Disable kexec if system has unaccepted memory

2022-06-28 Thread Kirill A. Shutemov
On Fri, Jun 24, 2022 at 05:00:05AM +0300, Kirill A. Shutemov wrote: > > If there is some deep and fundamental why this can not be supported > > then it probably makes sense to put some code in the arch_kexec_load > > hook that verifies that deep and fundamental reason is present. > > Sounds

Re: [PATCH v2] panic, kexec: Make __crash_kexec() NMI safe

2022-06-28 Thread Valentin Schneider
On 27/06/22 13:42, Valentin Schneider wrote: > On 25/06/22 12:04, Eric W. Biederman wrote: >> At this point I recommend going back to being ``unconventional'' with >> the kexec locking and effectively reverting commit 8c5a1cf0ad3a ("kexec: >> use a mutex for locking rather than xchg()"). >> >>

Re: [PATCH v3 0/3] tpm: Preserve TPM measurement log across kexec (ppc64)

2022-06-28 Thread Stefan Berger
On 6/28/22 12:58, Stefan Berger wrote: The of-tree subsystem does not currently preserve the IBM vTPM 1.2 and vTPM 2.0 measurement logs across a kexec on ppc64. This series fixes this for the kexec_file_load() syscall using the flattened device tree (fdt) to carry the measurement log's buffer

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

2022-06-28 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 v3 2/3] of: kexec: Refactor IMA buffer related functions to make them reusable

2022-06-28 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 --- drivers/of/kexec.c | 99 +- 1 file changed, 62 insertions(+), 37

[PATCH v3 1/3] tpm: of: Make of-tree specific function commonly available

2022-06-28 Thread Stefan Berger
Simplify tpm_read_log_of() by moving reusable parts of the code into its own file to make the code 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. Compile the new file when CONFIG_OF is enabled so

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

2022-06-28 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 ppc64. This series fixes this for the kexec_file_load() syscall using the flattened device tree (fdt) to carry the measurement log's buffer across kexec. Stefan Stefan Berger

Re: [PATCH v2 3/3] tpm/kexec: Duplicate TPM measurement log in of-tree for kexec

2022-06-28 Thread kernel test robot
Hi Stefan, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on linus/master v5.19-rc4 next-20220628] [cannot apply to robh/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

[PATCH v5.4] kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]

2022-06-28 Thread Naveen N. Rao
commit 3e35142ef99fe6b4fe5d834ad43ee13cca10a2dc upstream. Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [1], binutils (v2.36+) started dropping section symbols that it thought were unused. This isn't an issue in general, but with kexec_file.c, gcc is placing

[PATCH v4.9] kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]

2022-06-28 Thread Naveen N. Rao
commit 3e35142ef99fe6b4fe5d834ad43ee13cca10a2dc upstream. Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [1], binutils (v2.36+) started dropping section symbols that it thought were unused. This isn't an issue in general, but with kexec_file.c, gcc is placing

[PATCH v4.19] kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]

2022-06-28 Thread Naveen N. Rao
commit 3e35142ef99fe6b4fe5d834ad43ee13cca10a2dc upstream. Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [1], binutils (v2.36+) started dropping section symbols that it thought were unused. This isn't an issue in general, but with kexec_file.c, gcc is placing

[PATCH v4.14] kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]

2022-06-28 Thread Naveen N. Rao
commit 3e35142ef99fe6b4fe5d834ad43ee13cca10a2dc upstream. Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [1], binutils (v2.36+) started dropping section symbols that it thought were unused. This isn't an issue in general, but with kexec_file.c, gcc is placing

Re: [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver

2022-06-28 Thread Stefan Berger
On 6/27/22 18:43, Rob Herring wrote: On Thu, Jun 16, 2022 at 11:41:28AM -0400, Stefan Berger wrote: Simplify tpm_read_log_of() by moving Openfirmware-specific code into the Openfirmware driver to make the code reusable. Call the new There is no such 'Openfirmware driver'.

Re: [PATCH v2 0/3] tpm: Preserve TPM measurement log across kexec

2022-06-28 Thread Stefan Berger
On 6/27/22 18:33, Rob Herring wrote: On Thu, Jun 16, 2022 at 11:41:27AM -0400, Stefan Berger wrote: The of-tree driver does not currently preserve the IBM vTPM 1.2 and vTPM 2.0 measurement logs across a kexec. This series fixes this for the kexec_file_load() syscall using the flattened