Re: [PATCHv3 0/4] arm64: make phys_to_virt() correct

2022-01-11 Thread Pingfan Liu
Gently ping, any comments or suggestions? Thanks On Tue, Dec 28, 2021 at 9:27 PM Pingfan Liu wrote: > > Currently phys_to_virt() does not work well on 52-bits VA arm64 kernel. > One issue is contributed by phys_offset not signed. > The other is contributed by wrong page_offset. > > v2 -> v3: >

Re: [PATCH 1/3] memblock: define functions to set the usable memory range

2022-01-11 Thread Frank van der Linden
On Tue, Jan 11, 2022 at 12:31:58PM +0200, Mike Rapoport wrote: > > --- a/include/linux/memblock.h > > +++ b/include/linux/memblock.h > > @@ -481,6 +481,8 @@ phys_addr_t memblock_reserved_size(void); > > phys_addr_t memblock_start_of_DRAM(void); > > phys_addr_t memblock_end_of_DRAM(void); > >

Re: [PATCH v2 2/5] riscv: mm: init: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef

2022-01-11 Thread Palmer Dabbelt
On Mon, 06 Dec 2021 08:05:11 PST (-0800), jszh...@kernel.org wrote: Replace the conditional compilation using "#ifdef CONFIG_KEXEC_CORE" by a check for "IS_ENABLED(CONFIG_KEXEC_CORE)", to simplify the code and increase compile coverage. Signed-off-by: Jisheng Zhang --- arch/riscv/mm/init.c |

Re: [PATCH v19 06/13] kexec: move crashk[_low]_res to crash_core module

2022-01-11 Thread john . p . donnelly
On 12/28/21 7:26 AM, Zhen Lei wrote: From: Chen Zhou Move the definition and declaration of global variable crashk[_low]_res from kexec module to crash_core module, in preparation of adding generic reserve_crashkernel_mem[_low]() to crash_core.c, the latter refers to variable crashk[_low]_res.

Re: [PATCH v19 05/13] x86/setup: Add and use CRASH_BASE_ALIGN

2022-01-11 Thread john . p . donnelly
On 12/28/21 7:26 AM, Zhen Lei wrote: Add macro CRASH_BASE_ALIGN to indicate the alignment for crash kernel fixed region, in preparation for making partial implementation of reserve_crashkernel[_low]() generic. Signed-off-by: Zhen Lei > Acked-by: John Donnelly ---

Re: [PATCH v19 04/13] kdump: reduce unnecessary parameters of parse_crashkernel_{high|low}()

2022-01-11 Thread john . p . donnelly
On 12/28/21 7:26 AM, Zhen Lei wrote: Delete confusing parameters 'system_ram' and 'crash_base' of parse_crashkernel_{high|low}(), they are only needed by the case of "crashkernel=X@[offset]". Signed-off-by: Zhen Lei > Acked-by: John Donnelly --- kernel/crash_core.c | 21

Re: [PATCH v19 03/13] kdump: make parse_crashkernel_{high|low}() static

2022-01-11 Thread john . p . donnelly
On 12/28/21 7:26 AM, Zhen Lei wrote: Make parse_crashkernel_{high|low}() static, they are only referenced by parse_crashkernel_high_low() in the same file. The latter is recommended. Signed-off-by: Zhen Lei > Acked-by: John Donnelly --- include/linux/crash_core.h | 4

Re: [PATCH v19 02/13] x86/setup: Use parse_crashkernel_high_low() to simplify code

2022-01-11 Thread john . p . donnelly
On 12/28/21 7:26 AM, Zhen Lei wrote: Use parse_crashkernel_high_low() to bring the parsing of "crashkernel=X,high" and the parsing of "crashkernel=Y,low" together, they are strongly dependent, make code logic clear and more readable. Suggested-by: Borislav Petkov Signed-off-by: Zhen Lei >

Re: [PATCH v19 01/13] kdump: add helper parse_crashkernel_high_low()

2022-01-11 Thread john . p . donnelly
On 12/28/21 7:26 AM, Zhen Lei wrote: The bootup command line option crashkernel=Y,low is valid only when crashkernel=X,high is specified. Putting their parsing into a separate function makes the code logic clearer and easier to understand the strong dependencies between them. Signed-off-by:

[PATCH v5 1/6] s390/kexec_file: Don't opencode appended signature check.

2022-01-11 Thread Michal Suchanek
Module verification already implements appeded signature check. Reuse it for kexec_file. The kexec_file implementation uses EKEYREJECTED error in some cases when there is no key and the common implementation uses ENOPKG or EBADMSG instead. Signed-off-by: Michal Suchanek Acked-by: Heiko

[PATCH v5 6/6] module: Move duplicate mod_check_sig users code to mod_parse_sig

2022-01-11 Thread Michal Suchanek
Multiple users of mod_check_sig check for the marker, then call mod_check_sig, extract signature length, and remove the signature. Put this code in one place together with mod_check_sig. This changes the error from ENOENT to ENODATA for ima_read_modsig in the case the signature marker is

[PATCH v5 4/6] module: strip the signature marker in the verification function.

2022-01-11 Thread Michal Suchanek
It is stripped by each caller separately. Note: this changes the error for kexec_file from EKEYREJECTED to ENODATA when the signature marker is missing. Signed-off-by: Michal Suchanek --- v3: - Philipp Rudo : Update the commit with note about change of raturn value - the

[PATCH v5 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2022-01-11 Thread Michal Suchanek
Copy the code from s390x Both powerpc and s390x use appended signature format (as opposed to EFI based patforms using PE format). Signed-off-by: Michal Suchanek --- v3: - Philipp Rudo : Update the comit message with explanation why the s390 code is usable on powerpc. - Include correct

[PATCH v5 0/6] KEXEC_SIG with appended signature

2022-01-11 Thread Michal Suchanek
Hello, This is a refresh of the KEXEC_SIG series. This adds KEXEC_SIG support on powerpc and deduplicates the code dealing with appended signatures in the kernel. powerpc supports IMA_KEXEC but that's an exception rather than the norm. On the other hand, KEXEC_SIG is portable across platforms.

[PATCH v5 5/6] module: Use key_being_used_for for log messages in verify_appended_signature

2022-01-11 Thread Michal Suchanek
Add value for kexec appended signature and pass in key_being_used_for enum rather than a string to verify_appended_signature to produce log messages about the signature. Signed-off-by: Michal Suchanek --- arch/powerpc/kexec/elf_64.c | 2 +- arch/s390/kernel/machine_kexec_file.c

[PATCH v5 3/6] kexec_file: Don't opencode appended signature verification.

2022-01-11 Thread Michal Suchanek
Module verification already implements appeded signature verification. Reuse it for kexec_file. Signed-off-by: Michal Suchanek --- v3: - Philipp Rudo : Update the dependency on MODULE_SIG_FORMAT to MODULE_SIG - Include linux/verification.h - previously added in earlier patch v4: -

Re: [PATCH 1/3] memblock: define functions to set the usable memory range

2022-01-11 Thread Mike Rapoport
On Mon, Jan 10, 2022 at 09:08:07PM +, Frank van der Linden wrote: > Some architectures might limit the usable memory range based > on a firmware property, like "linux,usable-memory-range" > for ARM crash kernels. This limit needs to be enforced after > firmware memory map processing has been