RE: [PATCH v3 1/1] check that order of free pages falls within valid range

2022-04-11 Thread 萩尾 一仁
-Original Message- > This change makes __exclude_unnecessary_pages() more robust by > verifying that the order of a free page is valid before computing the size > of its memory block in the buddy system. > > The order of a free page cannot be larger than (MAX_ORDER - 1) because > the array

Re: [PATCH v6 4/8] crash: add generic infrastructure for crash hotplug support

2022-04-11 Thread Eric DeVolder
On 4/11/22 04:20, Baoquan He wrote: Hi Eric, On 04/01/22 at 02:30pm, Eric DeVolder wrote: ... ... +static void crash_hotplug_handler(unsigned int hp_action, + unsigned long a, unsigned long b) I am still struggling to consider if these unused parameters should be kept or removed. Do

Re: [PATCH v6 2/8] x86/crash: Introduce new options to support cpu and memory hotplug

2022-04-11 Thread Eric DeVolder
On 4/8/22 03:07, Baoquan He wrote: On 04/01/22 at 02:30pm, Eric DeVolder wrote: CRASH_HOTPLUG is to enable cpu and memory hotplug support of crash. CRASH_HOTPLUG_ELFCOREHDR_SZ is used to specify the maximum size of the elfcorehdr buffer/segment. This is a preparation for later usage. Signe

Re: [PATCH v6 4/8] crash: add generic infrastructure for crash hotplug support

2022-04-11 Thread Baoquan He
Hi Eric, On 04/01/22 at 02:30pm, Eric DeVolder wrote: ... ... > +static void crash_hotplug_handler(unsigned int hp_action, > + unsigned long a, unsigned long b) I am still struggling to consider if these unused parameters should be kept or removed. Do you foresee or feel on which ARCH they c

Re: [PATCH v5 1/3] kexec: clean up arch_kexec_kernel_verify_sig

2022-04-11 Thread Michal Suchánek
On Fri, Apr 01, 2022 at 09:31:16AM +0800, Coiby Xu wrote: > Currently there is no arch-specific implementation of > arch_kexec_kernel_verify_sig. Even if we want to add an implementation > for an architecture in the future, we can simply use "(struct > kexec_file_ops*)->verify_sig". So clean it up.

Re: [PATCH v5 RESEND 0/3] Convert vmcore to use an iov_iter

2022-04-11 Thread Heiko Carstens
On Fri, Apr 08, 2022 at 05:24:28PM +0800, Baoquan He wrote: > Add Heiko to CC. > > On 04/08/22 at 05:06pm, Baoquan He wrote: > > Copy the description of v3 cover letter from Willy: > > === > > For some reason several people have been sending bad patches to fix > > compiler warnings in vmcore recen

Re: [PATCH v5 3/3] arm64: kexec_file: use more system keyrings to verify kernel image signature

2022-04-11 Thread Michal Suchánek
On Fri, Apr 01, 2022 at 09:31:18AM +0800, Coiby Xu wrote: > Currently, a problem faced by arm64 is if a kernel image is signed by a > MOK key, loading it via the kexec_file_load() system call would be > rejected with the error "Lockdown: kexec: kexec of unsigned images is > restricted; see man kern

Re: [PATCH v5 2/3] kexec, KEYS: make the code in bzImage64_verify_sig generic

2022-04-11 Thread Michal Suchánek
On Fri, Apr 01, 2022 at 09:31:17AM +0800, Coiby Xu wrote: > The code in bzImage64_verify_sig could make use of system keyrings s/could make/makes/ > including .buitin_trusted_keys, .secondary_trusted_keys and .platform > keyring to verify signed kernel image as PE file. Make it generic so > both x8

[RFC v4 PATCH 0/5] In kernel handling of CPU hotplug events for crash kernel

2022-04-11 Thread Sourabh Jain
This patch series implements the crash hotplug handler on PowerPC introduced by https://lkml.org/lkml/2022/3/3/674 patch series. The Problem: Post hotplug/DLPAR events the capture kernel holds stale information about the system. Dump collection with stale capture kernel might end up

[RFC v4 PATCH 3/5] powrepc/crash hp: update kimage_arch struct

2022-04-11 Thread Sourabh Jain
Two new members fdt_index and fdt_index_valid are added in kimage_arch struct to track the FDT kexec segment. These new members of kimage_arch struct will help the crash hotplug handler to easily access the FDT segment from the kexec segment array. Otherwise, we have to loop through all kexec segme

[RFC v4 PATCH 4/5] powerpc/crash hp: add crash hotplug support for kexec_file_load

2022-04-11 Thread Sourabh Jain
Two major changes are done to enable the crash CPU hotplug handler. Firstly, updated the kexec load path to prepare kimage for hotplug changes, and secondly, implemented the crash hotplug handler. On the kexec load path, the memsz allocation of the crash FDT segment is updated to ensure that it ha

[RFC v4 PATCH 2/5] powerpc/crash hp: introduce a new config option CRASH_HOTPLUG

2022-04-11 Thread Sourabh Jain
The option CRASH_HOTPLUG enables, in kernel update to kexec segments on hotplug events. All the updates needed on the capture kernel load path in the kernel for both kexec_load and kexec_file_load system will be kept under this config. Signed-off-by: Sourabh Jain Reviewed-by: Eric DeVolder ---

[RFC v4 PATCH 1/5] powerpc/kexec: make update_cpus_node non-static

2022-04-11 Thread Sourabh Jain
Make the update_cpus_node function non-static and export it for usage in other kexec components. The update_cpus_node definition is moved to core_64.c so that it can be used with both kexec_load and kexec_file_load system calls. Signed-off-by: Sourabh Jain --- arch/powerpc/include/asm/kexec.h

Re: [PATCH v5 0/3] use more system keyrings to verify arm64 kdump kernel image signature

2022-04-11 Thread Michal Suchánek
On Mon, Apr 11, 2022 at 09:52:18AM +0800, Coiby Xu wrote: > On Mon, Apr 11, 2022 at 09:13:32AM +0800, Baoquan He wrote: > > On 04/08/22 at 10:59am, Michal Suchánek wrote: > > > On Fri, Apr 08, 2022 at 03:17:19PM +0800, Baoquan He wrote: > > > > Hi Coiby, > > > > > > > > On 04/01/22 at 09:31am, Coib

[RFC v4 PATCH 5/5] powerpc/crash hp: add crash hotplug support for kexec_load

2022-04-11 Thread Sourabh Jain
The kernel changes needed for crash hotplug support for kexec_load system calls are similar to kexec_file_load (which has already been implemented in earlier patches) except for finding the index of the FDT segment in the kexec segment array. Since the kexec segment array is prepared by the kexec t