Re: [PATCH] powerpc/pseries: add lparctl driver for platform-specific functions

2022-08-12 Thread Nathan Lynch
Laurent Dufour writes: > Le 30/07/2022 à 02:04, Nathan Lynch a écrit : >> +static long lparctl_get_sysparm(struct lparctl_get_system_parameter __user >> *argp) >> +{ >> +struct lparctl_get_system_parameter *gsp; >> +long ret; >> +int fwrc; >> + >> +/* >> + * Special case to al

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

2022-08-12 Thread Borislav Petkov
On Fri, Aug 12, 2022 at 01:14:38PM -0400, Stefan Berger wrote: > Yes, so this series can be tested by krobot. You mean Intel's 0day robot? I believe that thing has by now enough logic to figure out which branch to base patches ontop. Or maybe there's some magic incantation to tell it which base c

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

2022-08-12 Thread Stefan Berger
On 8/12/22 13:10, Borislav Petkov wrote: On Fri, Aug 12, 2022 at 12:43:02PM -0400, Stefan Berger wrote: 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 li

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

2022-08-12 Thread Borislav Petkov
On Fri, Aug 12, 2022 at 12:43:02PM -0400, Stefan Berger wrote: > 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

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

2022-08-12 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 v7 1/6] of: check previous kernel's ima-kexec-buffer against memory bounds

2022-08-12 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 v7 2/6] drivers: of: kexec ima: Support 32-bit platforms

2022-08-12 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 v7 5/6] of: kexec: Refactor IMA buffer related functions to make them reusable

2022-08-12 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 --- v6: - Add __init to get_kexec_buf

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

2022-08-12 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 v7 0/6] tpm: Preserve TPM measurement log across kexec (ppc64)

2022-08-12 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 v7 3/6] x86/kexec: Carry forward IMA measurement log on kexec

2022-08-12 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

Re: [PATCH v5] random: remove CONFIG_ARCH_RANDOM

2022-08-12 Thread Geert Uytterhoeven
Hi Jason, On Fri, Jul 8, 2022 at 2:44 AM Jason A. Donenfeld wrote: > When RDRAND was introduced, there was much discussion on whether it > should be trusted and how the kernel should handle that. Initially, two > mechanisms cropped up, CONFIG_ARCH_RANDOM, a compile time switch, and > "nordrand",

Re: [PATCH 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-08-12 Thread kernel test robot
Hi Sathvika, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.19 next-20220812] [cannot apply to powerpc/next powerpc/topic/ppc-kvm masahiroy-kbuild/for-next] [If your patch is applied to the wrong git tree, kindly drop us a

Re: [External] Re: [PATCH v3] PCI/ERR: Use pcie_aer_is_native() to judge whether OS owns AER

2022-08-12 Thread Zhuo Chen
On 8/3/22 6:18 AM, Sathyanarayanan Kuppuswamy wrote: On 7/27/22 2:37 AM, Zhuo Chen wrote: Do you mean changing "if ((host->native_aer || pcie_ports_native) && aer)" into "if  (pcie_aer_is_native(dev) && aer)" ? I thought changing into "if (pcie_aer_is_native(dev))" before. One another do

Re: [PATCH v2 14/14] powerpc/64s: Clear gprs on interrupt routine entry

2022-08-12 Thread Andrew Donnellan
On Mon, 2022-07-25 at 16:32 +1000, Rohan McLure wrote: > Zero GPRS r0, r2-r11, r14-r31, on entry into the kernel for all > other interrupt sources to limit influence of user-space values > in potential speculation gadgets. The remaining gprs are overwritten > by > entry macros to interrupt handlers

Re: [PATCH] docs: powerpc: add POWER9 and POWER10 to CPU families

2022-08-12 Thread Andrew Donnellan
On Wed, 2022-08-10 at 04:03 +, Nicholas Miehlbradt wrote: > Add POWER9 and POWER10 to CPU families and list Radix MMU. > > Signed-off-by: Nicholas Miehlbradt Reviewed-by: Andrew Donnellan -- Andrew DonnellanOzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

[PATCH] selftests/powerpc: Add missing PMU selftests to .gitignores

2022-08-12 Thread Russell Currey
Some recently added selftests don't have their binaries in .gitignores, so add them. I also alphabetically sorted sampling_tests/.gitignore while I was in there. Signed-off-by: Russell Currey --- .../powerpc/pmu/event_code_tests/.gitignore | 20 +++ .../powerpc/pmu/sampling_te