Re: [PATCH v4] kernel/crash_core.c : remove redundant check of ck_cmdline

2022-05-05 Thread Kari Argillander
On 6.5.2022 7.32, lizhe wrote: At the end of get_last_crashkernel(), the judgement of ck_cmdline is obviously unnecessary and causes redundance, let's clean it up. Signed-off-by: lizhe Signed off by should be real name. Greg ask this already, but you did not ever answer [1]. [1]: https://lor

Re: [PATCH v4] kernel/crash_core.c : remove redundant check of ck_cmdline

2022-05-05 Thread Baoquan He
Add Andrew to CC list On 05/05/22 at 09:32pm, lizhe wrote: > At the end of get_last_crashkernel(), the judgement of ck_cmdline is > obviously unnecessary and causes redundance, let's clean it up. > > Signed-off-by: lizhe > Acked-by: Baoquan He > Acked-by: Philipp Rudo > --- > kernel/crash_cor

[PATCH v4] kernel/crash_core.c : remove redundant check of ck_cmdline

2022-05-05 Thread lizhe
At the end of get_last_crashkernel(), the judgement of ck_cmdline is obviously unnecessary and causes redundance, let's clean it up. Signed-off-by: lizhe Acked-by: Baoquan He Acked-by: Philipp Rudo --- kernel/crash_core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/crash_core.

Re: [PATCH] kernel/crash_core.c : Remove redundant checks for ck_cmdline is NULL

2022-05-05 Thread Baoquan He
On 05/04/22 at 05:36am, lizhe wrote: > When ck_cmdline is NULL. The last three lines of > this function(get_last_crashkernel()) are equivalent to : > if (!NULL) > return NULL; > > return NULL; > This is obviously a redundant check Now the patch log correctly reflects the

Re: [PATCH v23 5/6] of: Support more than one crash kernel regions for kexec -s

2022-05-05 Thread Rob Herring
On Thu, 05 May 2022 17:18:44 +0800, Zhen Lei wrote: > When "crashkernel=X,high" is used, there may be two crash regions: > high=crashk_res and low=crashk_low_res. But now the syscall > kexec_file_load() only add crashk_res into "linux,usable-memory-range", > this may cause the second kernel to have

[PATCH v8 7/7] x86/crash: Add x86 crash hotplug support for kexec_load

2022-05-05 Thread Eric DeVolder
For kexec_file_load support, the loading of the crash kernel occurs entirely within the kernel, and as such the elfcorehdr is readily identified (so that it can be modified upon hotplug events). This change enables support for kexec_load by identifying the elfcorehdr segment in the arch_crash_hand

[PATCH v8 2/7] crash: prototype change for crash_prepare_elf64_headers

2022-05-05 Thread Eric DeVolder
>From within crash_prepare_elf64_headers() there is a need to reference the struct kimage hotplug members. As such, this change passes the struct kimage as a parameter to the crash_prepare_elf64_headers(). This is preparation for later patch, no functionality change. Signed-off-by: Eric DeVolder

[PATCH v8 4/7] kexec: exclude elfcorehdr from the segment digest

2022-05-05 Thread Eric DeVolder
When a crash kernel is loaded via the kexec_file_load syscall, the kernel places the various segments (ie crash kernel, crash initrd, boot_params, elfcorehdr, purgatory, etc) in memory. For those architectures that utilize purgatory, a hash digest of the segments is calculated for integrity checkin

[PATCH v8 0/7] crash: Kernel handling of CPU and memory hot un/plug

2022-05-05 Thread Eric DeVolder
When the kdump service is loaded, if a CPU or memory is hot un/plugged, the crash elfcorehdr (for x86), which describes the CPUs and memory in the system, must also be updated, else the resulting vmcore is inaccurate (eg. missing either CPU context or memory regions). The current solution utilizes

[PATCH v8 3/7] crash: add generic infrastructure for crash hotplug support

2022-05-05 Thread Eric DeVolder
CPU and memory change notifications are received in order to regenerate the elfcorehdr. To support cpu hotplug, a callback is registered to capture the CPUHP_AP_ONLINE_DYN online and offline events via cpuhp_setup_state_nocalls(). To support memory hotplug, a notifier is registered to capture the

[PATCH v8 1/7] x86/crash: fix minor typo/bug in debug message

2022-05-05 Thread Eric DeVolder
The pr_debug() intends to display the memsz member, but the parameter is actually the bufsz member (which is already displayed). Correct this to display memsz value. Signed-off-by: Eric DeVolder Reviewed-by: David Hildenbrand Acked-by: Baoquan He --- arch/x86/kernel/crash.c | 2 +- 1 file chan

[PATCH v8 6/7] x86/crash: Add x86 crash hotplug support for kexec_file_load

2022-05-05 Thread Eric DeVolder
For x86_64, when CPU or memory is hot un/plugged, the crash elfcorehdr, which describes the CPUs and memory in the system, must also be updated. To update the elfcorehdr for x86_64, a new elfcorehdr must be generated from the available CPUs and memory. The new elfcorehdr is prepared into a buffer,

[PATCH v8 5/7] kexec: exclude hot remove cpu from elfcorehdr notes

2022-05-05 Thread Eric DeVolder
Due to use of CPUHP_AP_ONLINE_DYN, upon CPU unplug, the CPU is still in the for_each_present_cpu() list when within the handle_hotplug_event(). Thus the CPU must be explicitly excluded when building the new list of CPUs. This change identifies in handle_hotplug_event() the CPU to be excluded, and

Re: [PATCH v23 3/6] arm64: kdump: Reimplement crashkernel=X

2022-05-05 Thread Catalin Marinas
On Thu, May 05, 2022 at 05:18:42PM +0800, Zhen Lei wrote: > From: Chen Zhou > > There are following issues in arm64 kdump: > 1. We use crashkernel=X to reserve crashkernel in DMA zone, which > will fail when there is not enough low memory. > 2. If reserving crashkernel above DMA zone, in this cas

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

2022-05-05 Thread Eric DeVolder
On 4/29/22 01:41, Sourabh Jain wrote: On 26/04/22 20:09, Eric DeVolder wrote: On 4/25/22 23:21, Sourabh Jain wrote: On 13/04/22 22:12, 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

Re: [PATCH v22 5/9] arm64: kdump: Reimplement crashkernel=X

2022-05-05 Thread Catalin Marinas
On Thu, May 05, 2022 at 11:00:19AM +0800, Baoquan He wrote: > On 05/03/22 at 11:00pm, Catalin Marinas wrote: > > So, to recap, IIUC you are fine with: > > > > crashkernel=Y - allocate within ZONE_DMA with fallback > > above with a default in ZONE_DMA (li

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

2022-05-05 Thread Eric DeVolder
On 5/5/22 06:04, Baoquan He wrote: On 05/05/22 at 03:29pm, Sourabh Jain wrote: On 05/05/22 11:15, Baoquan He wrote: On 04/28/22 at 10:48am, Sourabh Jain wrote: Hi Baoquan, On 26/04/22 10:52, Baoquan He wrote: On 04/26/22 at 09:36am, Sourabh Jain wrote: On 15/04/22 03:59, Eric DeVolder wr

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

2022-05-05 Thread Baoquan He
On 05/05/22 at 03:29pm, Sourabh Jain wrote: > > On 05/05/22 11:15, Baoquan He wrote: > > On 04/28/22 at 10:48am, Sourabh Jain wrote: > > > Hi Baoquan, > > > > > > On 26/04/22 10:52, Baoquan He wrote: > > > > On 04/26/22 at 09:36am, Sourabh Jain wrote: > > > > > On 15/04/22 03:59, Eric DeVolder wr

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

2022-05-05 Thread Sourabh Jain
On 05/05/22 11:15, Baoquan He wrote: On 04/28/22 at 10:48am, Sourabh Jain wrote: Hi Baoquan, On 26/04/22 10:52, Baoquan He wrote: On 04/26/22 at 09:36am, Sourabh Jain wrote: On 15/04/22 03:59, Eric DeVolder wrote: .. +#if defined(CONFIG_MEMORY_HOTPLUG) +static int crash_memhp_notifier

Re: [PATCH] Add method to pass initrd through cmdline

2022-05-05 Thread Hui Li
Hi Simon Horman Thanks for your reply. On 2022/5/3 下午2:29, Simon Horman wrote: On Tue, May 03, 2022 at 01:50:19PM +0800, Hui Li wrote: Hi Simon Horman, Thanks for your review. On 2022/4/29 下午5:40, Simon Horman wrote: Hi Hui Li, thanks for your patch. On Mon, Apr 18, 2022 at 09:36:59AM +0

[PATCH v3] kexec-tools:mips:Pass initrd parameter via cmdline

2022-05-05 Thread Hui Li
Under loongson platform,use command: kexec -l vmlinux... --append="root=UUID=28e1..." --initrd=... kexec -e quick restart failed like this: [3.420791] VFS: Cannot open root device "UUID=6462a8a4-02fb-49ff-bcb6-54fe53813c2a" or unknown-block(0,0): error -6 [3.431262] Please append a correc