Re: [v1 PATCH 1/2] Refactoring carrying over IMA measuremnet logs over Kexec.

2020-06-07 Thread kernel test robot
Hi Prakhar, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on arm64/for-next/core] [also build test WARNING on powerpc/next soc/for-next v5.7 next-20200605] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we

Re: [v1 PATCH 1/2] Refactoring carrying over IMA measuremnet logs over Kexec.

2020-06-07 Thread kernel test robot
Hi Prakhar, Thank you for the patch! Yet something to improve: [auto build test ERROR on arm64/for-next/core] [also build test ERROR on powerpc/next soc/for-next v5.7 next-20200605] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also

Re: [v1 PATCH 1/2] Refactoring carrying over IMA measuremnet logs over Kexec.

2020-06-07 Thread kernel test robot
/scm/linux/kernel/git/arm64/linux.git for-next/core config: arm64-randconfig-r012-20200607 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e429cffd4f228f70c1d9df0e5d77c08590dd9766) reproduce (this is a W=1 build): wget https

[v1 PATCH 2/2] Add Documentation regarding the ima-kexec-buffer node in the chosen node documentation

2020-06-07 Thread Prakhar Srivastava
Add Documentation regarding the ima-kexec-buffer node in the chosen node documentation Signed-off-by: Prakhar Srivastava --- Documentation/devicetree/bindings/chosen.txt | 17 + 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/chosen.txt

[v1 PATCH 0/2] Adding support to carry IMA measurement logs

2020-06-07 Thread Prakhar Srivastava
IMA during kexec(kexec file load) verifies the kernel signature and measures the signature of the kernel. The signature in the logs can be used to verfiy the authenticity of the kernel. The logs don not get carried over kexec and thus remote attesation cannot verify the signature of the running

[v1 PATCH 1/2] Refactoring carrying over IMA measuremnet logs over Kexec.

2020-06-07 Thread Prakhar Srivastava
This patch moves the non-architecture specific code out of powerpc and adds to security/ima. Update the arm64 and powerpc kexec file load paths to carry the IMA measurement logs. Signed-off-by: Prakhar Srivastava --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/ima.h

Re: Boot issue with the latest Git kernel

2020-06-07 Thread Aneesh Kumar K.V
Christian Zigotzky writes: > On 04 June 2020 at 7:15 pm, Christophe Leroy wrote: >> Yes today's linux-next boots on my powerpc 8xx board. >> >> Christophe > Hello Christophe, > > Thanks for testing. > > I was able to perform a 'git bisect' [1] and identified the bad commit. > [2] I reverted

Re: Boot issue with the latest Git kernel

2020-06-07 Thread Christian Zigotzky
Hi All, It seems, someone has fixed the boot issue. The latest Git kernel boots on my PowerPC machines. Thanks, Christian On 05 June 2020 at 6:23 pm, Christian Zigotzky wrote: On 04 June 2020 at 7:15 pm, Christophe Leroy wrote: Yes today's linux-next boots on my powerpc 8xx board.

[PATCH v11 6/6] powerpc/papr_scm: Implement support for PAPR_PDSM_HEALTH

2020-06-07 Thread Vaibhav Jain
This patch implements support for PDSM request 'PAPR_PDSM_HEALTH' that returns a newly introduced 'struct nd_papr_pdsm_health' instance containing dimm health information back to user space in response to ND_CMD_CALL. This functionality is implemented in newly introduced papr_pdsm_health() that

[PATCH v11 2/6] seq_buf: Export seq_buf_printf

2020-06-07 Thread Vaibhav Jain
'seq_buf' provides a very useful abstraction for writing to a string buffer without needing to worry about it over-flowing. However even though the API has been stable for couple of years now its still not exported to kernel loadable modules limiting its usage. Hence this patch proposes update to

[PATCH v11 4/6] powerpc/papr_scm: Improve error logging and handling papr_scm_ndctl()

2020-06-07 Thread Vaibhav Jain
Since papr_scm_ndctl() can be called from outside papr_scm, its exposed to the possibility of receiving NULL as value of 'cmd_rc' argument. This patch updates papr_scm_ndctl() to protect against such possibility by assigning it pointer to a local variable in case cmd_rc == NULL. Finally the patch

[PATCH v11 5/6] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-06-07 Thread Vaibhav Jain
Introduce support for PAPR NVDIMM Specific Methods (PDSM) in papr_scm module and add the command family NVDIMM_FAMILY_PAPR to the white list of NVDIMM command sets. Also advertise support for ND_CMD_CALL for the nvdimm command mask and implement necessary scaffolding in the module to handle

[PATCH v11 3/6] powerpc/papr_scm: Fetch nvdimm health information from PHYP

2020-06-07 Thread Vaibhav Jain
Implement support for fetching nvdimm health information via H_SCM_HEALTH hcall as documented in Ref[1]. The hcall returns a pair of 64-bit bitmap, bitwise-and of which is then stored in 'struct papr_scm_priv' and subsequently partially exposed to user-space via newly introduced dimm specific

[PATCH v11 1/6] powerpc: Document details on H_SCM_HEALTH hcall

2020-06-07 Thread Vaibhav Jain
Add documentation to 'papr_hcalls.rst' describing the bitmap flags that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM specification. Cc: "Aneesh Kumar K . V" Cc: Dan Williams Cc: Michael Ellerman Cc: Ira Weiny Acked-by: Ira Weiny Signed-off-by: Vaibhav Jain --- Changelog:

[PATCH v11 0/6] powerpc/papr_scm: Add support for reporting nvdimm health

2020-06-07 Thread Vaibhav Jain
Changes since v10 [1]: * Changed the definition of 'struct nd_papr_pdsm_health' to a maximal struct 184 bytes which can be extended in future with newly introduced 'extension_flags' * Fixed a suspicious conversion from u64 to u8 in papr_pdsm_health that was preventing correct initialization

[PATCH 1/2] powerpc/64s: remove PROT_SAO support

2020-06-07 Thread Nicholas Piggin
ISA v3.1 does not support the SAO storage control attribute required to implement PROT_SAO. PROT_SAO was used by specialised system software (Lx86) that has been discontinued for about 7 years, and is not thought to be used elsewhere, so removal should not cause problems. We rather remove it than

[PATCH 2/2] powerpc/64s/hash: disable subpage_prot syscall by default

2020-06-07 Thread Nicholas Piggin
The subpage_prot syscall was added for specialised system software (Lx86) that has been discontinued for about 7 years, and is not thought to be used elsewhere, so disable it by default. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 1 +

[PATCH v5 4/4] riscv: Check relocations at compile time

2020-06-07 Thread Alexandre Ghiti
Relocating kernel at runtime is done very early in the boot process, so it is not convenient to check for relocations there and react in case a relocation was not expected. There exists a script in scripts/ that extracts the relocations from vmlinux that is then used at postlink to check the

[PATCH v5 3/4] powerpc: Move script to check relocations at compile time in scripts/

2020-06-07 Thread Alexandre Ghiti
Relocating kernel at runtime is done very early in the boot process, so it is not convenient to check for relocations there and react in case a relocation was not expected. Powerpc architecture has a script that allows to check at compile time for such unexpected relocations: extract the common

[PATCH v5 2/4] riscv: Introduce CONFIG_RELOCATABLE

2020-06-07 Thread Alexandre Ghiti
This config allows to compile the kernel as PIE and to relocate it at any virtual address at runtime: this paves the way to KASLR and to 4-level page table folding at runtime. Runtime relocation is possible since relocation metadata are embedded into the kernel. Note that relocating at runtime

[PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-06-07 Thread Alexandre Ghiti
This is a preparatory patch for relocatable kernel. The kernel used to be linked at PAGE_OFFSET address and used to be loaded physically at the beginning of the main memory. Therefore, we could use the linear mapping for the kernel mapping. But the relocated kernel base address will be different

[PATCH v5 0/4] vmalloc kernel mapping and relocatable kernel

2020-06-07 Thread Alexandre Ghiti
This patchset originally implemented relocatable kernel support but now also moves the kernel mapping into the vmalloc zone. The first patch explains why we need to move the