[PATCH] crash: add prefix for crash dumping messages

2024-04-17 Thread Baoquan He
keyword crashkernel at the beginning or in the middle, adding pr_fmt() makes it redundant. Signed-off-by: Baoquan He --- kernel/crash_core.c| 2 ++ kernel/crash_reserve.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index

Re: [PATCH v2] kexec: fix the unexpected kexec_dprintk() macro

2024-04-13 Thread Baoquan He
Hi Dave, On 04/12/24 at 03:28pm, Dave Young wrote: > On Tue, 9 Apr 2024 at 12:23, Baoquan He wrote: > > > > Jiri reported that the current kexec_dprintk() always prints out > > debugging message whenever kexec/kdmmp loading is triggered. That is > > not wanted. The de

Re: [PATCH v2] kexec: fix the unexpected kexec_dprintk() macro

2024-04-13 Thread Baoquan He
On 04/12/24 at 03:28pm, Dave Young wrote: > On Tue, 9 Apr 2024 at 12:23, Baoquan He wrote: > > > > Jiri reported that the current kexec_dprintk() always prints out > > debugging message whenever kexec/kdmmp loading is triggered. That is > > not wanted. The de

[PATCH v2] kexec: fix the unexpected kexec_dprintk() macro

2024-04-08 Thread Baoquan He
prints out. I thought printk(KERN_DEBUG) is equal to pr_debug(), it's not. Fix it by changing to use pr_info() instead which are expected to work. Fixes: cbc2fe9d9cb2 ("kexec_file: add kexec_file flag to control debug printing") Signed-off-by: Baoquan He Reported-by: Jiri Slaby Clos

Re: [PATCH v2] vmcore: replace strncpy with strscpy_pad

2024-04-03 Thread Baoquan He
_hdr->n_descsz = size + sizeof(vdd_hdr->dump_name); > vdd_hdr->n_type = NT_VMCOREDD; > > - strncpy((char *)vdd_hdr->name, VMCOREDD_NOTE_NAME, > - sizeof(vdd_hdr->name)); > - memcpy(vdd_hdr->dump_name, data->dump_name, sizeof(vdd_hdr->dump_name)); > + strscpy_pad(vdd_hdr->name, VMCOREDD_NOTE_NAME); > + strscpy_pad(vdd_hdr->dump_name, data->dump_name); LGTM, thx Acked-by: Baoquan He

Re: [PATCH 1/2] arch/loongarch: clean up the left code and Kconfig item related to CRASH_CORE

2024-03-30 Thread Baoquan He
On 03/30/24 at 09:59pm, Huacai Chen wrote: > Queued, thanks. Thanks, Huacai. While I noticed Andrew has queued this patchset in his mm-unstable branch. > > Huacai > > On Fri, Mar 29, 2024 at 9:28 PM Baoquan He wrote: > > > > In commit 85fcde402db1 ("kexec: sp

[PATCH 1/2] arch/loongarch: clean up the left code and Kconfig item related to CRASH_CORE

2024-03-29 Thread Baoquan He
Do it now. Signed-off-by: Baoquan He Cc: Huacai Chen Cc: WANG Xuerui Cc: loonga...@lists.linux.dev --- arch/loongarch/Kconfig | 2 +- arch/loongarch/include/asm/{crash_core.h => crash_reserve.h} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)

[PATCH 2/2] Documentation: kdump: clean up the outdated description

2024-03-29 Thread Baoquan He
Signed-off-by: Baoquan He Cc: cor...@lwn.net --- Documentation/admin-guide/kdump/kdump.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst index 0302a93b1d40..5376890adbeb 100644 --- a/Doc

[PATCH 0/2] crash: clean up outdated codes and doc related to CRASH_CORE

2024-03-29 Thread Baoquan He
As Geert pointed out that there are still left codes and doc related to CRASH_CORE in arch/loongarch and Documentation. So make these two patches to clean them up. Thanks to Geert. Baoquan He (2): arch/loongarch: clean up the left code and Kconfig item related to CRASH_CORE Documentation

Re: [PATCH] vmcore: replace strncpy with strtomem

2024-03-27 Thread Baoquan He
On 03/27/24 at 09:10pm, Justin Stitt wrote: > strncpy() is in the process of being replaced as it is deprecated in > some situations [1]. While the specific use of strncpy that this patch > targets is not exactly deprecated, the real mission is to rid the kernel > of all its uses. > > Looking at

Re: [PATCH v2] crash: use macro to add crashk_res into iomem early for specific arch

2024-03-25 Thread Baoquan He
On 03/25/24 at 01:29pm, Andrew Morton wrote: > On Mon, 25 Mar 2024 09:50:50 +0800 Baoquan He wrote: > > > There are regression reports[1][2] that crashkernel region on x86_64 can't > > be added into iomem tree sometime. This causes the later failure of kdump > >

Re: [PATCH linux-next v3 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-03-25 Thread Baoquan He
On 03/25/24 at 09:24am, Geert Uytterhoeven wrote: > Hi Baoquan, > > On Wed, Jan 24, 2024 at 6:13 AM Baoquan He wrote: > > Now move the relevant codes into separate files: > > kernel/crash_reserve.c, include/linux/crash_reserve.h. > > > > And add config item CRAS

[PATCH v2] crash: use macro to add crashk_res into iomem early for specific arch

2024-03-24 Thread Baoquan He
rg/all/zfv8icl6ct2jq...@darkstar.users.ipa.redhat.com/T/#u [2] Question about Address Range Validation in Crash Kernel Allocation https://lore.kernel.org/all/4eeac1f733584855965a2ea62fa4d...@huawei.com/T/#u Signed-off-by: Baoquan He --- v1->v2: - Remove the stray space before 'define' when defining HAVE_ARCH_ADD_C

Re: [PATCH] crash: use macro to add crashk_res into iomem early for specific arch

2024-03-24 Thread Baoquan He
On 03/24/24 at 11:27am, Ingo Molnar wrote: > > * Baoquan He wrote: > > > On 03/24/24 at 05:06am, Ingo Molnar wrote: > > > > > > * Baoquan He wrote: > > > > > ..snip > > > > --- > > > > arch/x86/include/asm/

Re: [PATCH] crash: use macro to add crashk_res into iomem early for specific arch

2024-03-24 Thread Baoquan He
On 03/24/24 at 05:06am, Ingo Molnar wrote: > > * Baoquan He wrote: > ..snip > > --- > > arch/x86/include/asm/crash_reserve.h | 2 ++ > > kernel/crash_reserve.c | 7 +++ > > 2 files changed, 9 insertions(+) > > > > diff --git

[PATCH] crash: use macro to add crashk_res into iomem early for specific arch

2024-03-23 Thread Baoquan He
rg/all/zfv8icl6ct2jq...@darkstar.users.ipa.redhat.com/T/#u [2] Question about Address Range Validation in Crash Kernel Allocation https://lore.kernel.org/all/4eeac1f733584855965a2ea62fa4d...@huawei.com/T/#u Signed-off-by: Baoquan He --- arch/x86/include/asm/crash_reserve.h | 2 ++ kernel/crash_reserve.c

Re: Question about Address Range Validation in Crash Kernel Allocation

2024-03-21 Thread Baoquan He
On 03/21/24 at 08:37pm, Li Huafei wrote: > > > On 2024/3/21 18:06, Dave Young wrote: > > Hi, > > > > On Thu, 21 Mar 2024 at 17:49, Li Huafei wrote: > >> > >> Hi Baoquan, > >> > >> On 2024/3/21 17:17, chenhaixiang (A) wrote: > >>> > > I'm sorry for the delay. Here are some details from the

[PATCH] util_lib/elf_info.c: fix a warning

2024-03-21 Thread Baoquan He
it to avoid oob access of array. Signed-off-by: Baoquan He --- util_lib/elf_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util_lib/elf_info.c b/util_lib/elf_info.c index ce71c6055c3a..7ca9870bfca0 100644 --- a/util_lib/elf_info.c +++ b/util_lib/elf_info.c @@ -357,7 +357,7

Re: Question about Address Range Validation in Crash Kernel Allocation

2024-03-21 Thread Baoquan He
On 03/21/24 at 03:22am, chenhaixiang (A) wrote: > I'm sorry for the delay. Here are some details from the boot log and > /proc/iomem: > The Boot log: > [0.00] Linux version 6.8.0 (root@localhost.localdomain) (gcc (GCC) > 10.3.1, GNU ld (GNU Binutils) 2.37) #3 SMP PREEMPT_DYNAMIC Wed Mar

Re: [RFC PATCH v3 0/7] device backed vmemmap crash dump support

2024-03-21 Thread Baoquan He
TION=="bind", GOTO="kdump_reload" > > SUBSYSTEM=="dax", KERNEL=="dax[0-9].*", ACTION=="unbind", > > GOTO="kdump_reload" > > > > Regarding 2), my idea is that it would need to call the memory_notify() i

Re: Question about Address Range Validation in Crash Kernel Allocation

2024-03-20 Thread Baoquan He
On 03/20/24 at 01:12pm, chenhaixiang (A) wrote: > I tested the kernel-6.8 on my machine and found that the crashkernel memory > reservation range is consistent with kernel-5.10. However, it's strange that > when crashkernel=512M, the kernel still allocates two memory segments for > crashkernel,

Re: [bug report] WARNING: CPU: 0 PID: 1 at kernel/resource.c:834 __insert_resource+0x84/0x110

2024-03-20 Thread Baoquan He
On 03/20/24 at 05:06pm, Changhui Zhong wrote: > On Tue, Mar 19, 2024 at 10:43 PM Baoquan He wrote: > > > > On 03/19/24 at 01:59pm, Ilpo Järvinen wrote: > > > On Tue, 19 Mar 2024, Changhui Zhong wrote: > > > > > > > Hello, > > > > >

Re: [bug report] WARNING: CPU: 0 PID: 1 at kernel/resource.c:834 __insert_resource+0x84/0x110

2024-03-19 Thread Baoquan He
On 03/19/24 at 01:59pm, Ilpo Järvinen wrote: > On Tue, 19 Mar 2024, Changhui Zhong wrote: > > > Hello, > > > > found a kernel warning issue at "kernel/resource.c:834 > > __insert_resource+0x84/0x110" ,please help check, > > > >

Re: Question about Address Range Validation in Crash Kernel Allocation

2024-03-19 Thread Baoquan He
t; markings, and if not supported, whether kexec-tools should raise an error. > Thanks > Chen Haixiang > -- > On 03/19/24 at 9:38qm, Baoquan He wrote: > > Hi, > > > > On 03/18/24 at 12:00pm, chenhaixiang (A) wrote: > > > Dear kexec Community Members, >

Re: Question about Address Range Validation in Crash Kernel Allocation

2024-03-18 Thread Baoquan He
Hi, On 03/18/24 at 12:00pm, chenhaixiang (A) wrote: > Dear kexec Community Members, > > I encountered an issue while using kexec-tools on my x86_64 machine. > When there is a segment marked as 'reserved' within the memory range > allocated for the crash kernel in /proc/iomem,the output appears

Re: [PATCH] kexec_file: add kexec_file flag to support debug printing

2024-03-15 Thread Baoquan He
On 03/15/24 at 09:39am, Simon Horman wrote: > On Fri, Mar 15, 2024 at 04:11:50PM +0800, Baoquan He wrote: > > On 11/27/23 at 01:32pm, Simon Horman wrote: > > > On Tue, Nov 14, 2023 at 11:20:30PM +0800, Baoquan He wrote: > > > > This add KEXEC_FILE_DEBUG to kexec_file_

Re: [PATCH] kexec_file: add kexec_file flag to support debug printing

2024-03-15 Thread Baoquan He
On 11/27/23 at 01:32pm, Simon Horman wrote: > On Tue, Nov 14, 2023 at 11:20:30PM +0800, Baoquan He wrote: > > This add KEXEC_FILE_DEBUG to kexec_file_flags so that it can be passed > > to kernel when '-d' is added with kexec_file_load interface. With that > > flag enabl

Re: [PATCH] kexec: fix the unexpected kexec_dprintk() macro

2024-03-14 Thread Baoquan He
On 03/14/24 at 12:54pm, Jiri Slaby wrote: > On 14. 03. 24, 11:39, Baoquan He wrote: > > Jiri reported that the current kexec_dprintk() always prints out > > debugging message whenever kexec/kdmmp loading is triggered. That is > > not wanted. The debugging message is supposed t

[PATCH] kexec: fix the unexpected kexec_dprintk() macro

2024-03-14 Thread Baoquan He
prints out. I thought printk(KERN_DEBUG) is equal to pr_debug(), it's not. Fix it by changing to use pr_info() and pr_debug() instead which are expected to work. Signed-off-by: Baoquan He Reported-by: Jiri Slaby Closes: https://lore.kernel.org/all/4c775fca-5def-4a2d-8437-7130b0272...@kernel.org

Re: kexec verbose dumps with 6.8 [was: [PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing]

2024-03-13 Thread Baoquan He
On 03/13/24 at 06:58am, Jiri Slaby wrote: > Hi, > > > On 13. 03. 24, 1:48, Baoquan He wrote: > > Hi Jiri, > > > > On 03/12/24 at 10:58am, Jiri Slaby wrote: > > > On 13. 12. 23, 6:57, Baoquan He wrote: > > ... snip... > > > > --- a/

Re: kexec verbose dumps with 6.8 [was: [PATCH v4 1/7] kexec_file: add kexec_file flag to control debug printing]

2024-03-12 Thread Baoquan He
Hi Jiri, On 03/12/24 at 10:58am, Jiri Slaby wrote: > On 13. 12. 23, 6:57, Baoquan He wrote: ... snip... > > --- a/include/linux/kexec.h > > +++ b/include/linux/kexec.h > ... > > @@ -500,6 +500,13 @@ static inline int crash_hotplug_memory_support(void) { > > r

Re: [PATCH V3] kexec: copy only happens before uchunk goes to zero

2024-02-29 Thread Baoquan He
ningless reading even though it > doesn't harm. > > So let's change to make sure that all of the copying and the rest only > happens before uchunk goes to zero. > > Acked-by: Baoquan He > Signed-off-by: yang.zhang > > --- > V2 -> V3: > - Add more detailed de

Re: [PATCH v17 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-02-29 Thread Baoquan He
Hi Sourabh, On 02/26/24 at 02:11pm, Sourabh Jain wrote: > Commit 247262756121 ("crash: add generic infrastructure for crash > hotplug support") added a generic infrastructure that allows > architectures to selectively update the kdump image component during CPU > or memory add/remove events

Re: [PATCH v17 3/6] powerpc/kexec: move *_memory_ranges functions to ranges.c

2024-02-29 Thread Baoquan He
On 02/26/24 at 02:11pm, Sourabh Jain wrote: > Move the following functions form kexec/{file_load_64.c => ranges.c} and > make them public so that components other KEXEC_FILE can also use these ^ 'than' missed? >

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-28 Thread Baoquan He
_file.c > @@ -376,6 +376,11 @@ SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, > initrd_fd, > if (ret) > goto out; > > +#ifdef CONFIG_CRASH_HOTPLUG > + if ((flags & KEXEC_FILE_ON_CRASH) && arch_crash_hotplug

Re: [PATCH v17 2/6] crash: add a new kexec flag for hotplug support

2024-02-28 Thread Baoquan He
kexec_load and kexec_file_load system calls. This > > simplifies kernel checks to identify hotplug support for the currently > > loaded kdump image by just examining the value of @hotplug_support. > > > > Signed-off-by: Sourabh Jain > > Cc: Akhil Raj > > Cc:

Re: [PATCH linux-next v2 0/3] powerpc/kexec: split CONFIG_CRASH_DUMP out from CONFIG_KEXEC_CORE

2024-02-28 Thread Baoquan He
On 02/26/24 at 04:00pm, Hari Bathini wrote: > This patch series is a follow-up to [1] based on discussions at [2] > about additional work needed to get it working on powerpc. > > The first patch in the series makes struct crash_mem available with or > without CONFIG_CRASH_DUMP enabled. The next

Re: [PATCH linux-next v2 1/3] kexec/kdump: make struct crash_mem available without CONFIG_CRASH_DUMP

2024-02-27 Thread Baoquan He
ucture for loading kexec kernel. Anyway, for the time being, this is the simplest way we can take. Thanks for the work on ppc to make crash split out from the kexec code. Acked-by: Baoquan He > definition of crash_mem structure available for !CONFIG_CRASH_DUMP > case too. > &g

Re: [PATCH] makedumpfile: ppc64: read cur_mmu_type from vmcoreinfo

2024-02-22 Thread Baoquan He
Add maintainer Kazu to CC. On 02/23/24 at 11:23am, Aditya Gupta wrote: > Currently makedumpfile depends on reading the 'cur_cpu_spec' kernel > symbol to get the current MMU type on PowerPC64. > > The disadvantage with this approach was that it depends on bit '0x40' > ('MMU_FTR_TYPE_RADIX') being

Re: [PATCHv7 07/16] x86/mm: Return correct level from lookup_address() if pte is none

2024-02-22 Thread Baoquan He
On 02/22/24 at 04:04pm, Kirill A. Shutemov wrote: > On Thu, Feb 22, 2024 at 07:01:41PM +0800, Baoquan He wrote: > > On 02/21/24 at 04:15pm, Kirill A. Shutemov wrote: > > > On Wed, Feb 21, 2024 at 10:37:29AM +0800, Baoquan He wrote: > > > > > diff --git a/arch/x86

Re: [PATCHv7 07/16] x86/mm: Return correct level from lookup_address() if pte is none

2024-02-22 Thread Baoquan He
On 02/21/24 at 04:15pm, Kirill A. Shutemov wrote: > On Wed, Feb 21, 2024 at 10:37:29AM +0800, Baoquan He wrote: > > > diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c > > > index 3612e3167147..425ff6e192e6 100644 > > > --- a/arch/x86/mm/pat/set

Re: [PATCH v2 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-02-21 Thread Baoquan He
On 02/21/24 at 11:07pm, Sourabh Jain wrote: > Hello Baoquan, > > On 19/01/24 20:22, Baoquan He wrote: > > Now move the relevant codes into separate files: > > kernel/crash_reserve.c, include/linux/crash_reserve.h. > > > > And add config item CRASH_RESERVE to cont

Re: [PATCH v2] kexec: copy only happens before uchunk goes to zero

2024-02-21 Thread Baoquan He
e that all of the copying and the rest only happens before uchunk goes to zero. === Please take above words as reference to udpate patch log and post v3, and you can add: Acked-by: Baoquan He > > Signed-off-by: yang.zhang > > --- > v1 -> v2: > - Only copy before uchunk goes

Re: [PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-02-21 Thread Baoquan He
On 02/21/24 at 12:57pm, Andrew Morton wrote: > On Wed, 21 Feb 2024 11:15:00 +0530 Hari Bathini > wrote: > > > On 04/02/24 8:56 am, Baoquan He wrote: > > >>> Hope Hari and Pingfan can help have a look, see if > > >>> it's doable. Now, I mak

Re: [PATCH v16 2/5] crash: add a new kexec flag for hotplug support

2024-02-21 Thread Baoquan He
et the @hotplug_support member of struct > > kimage for both kexec_load and kexec_file_load system calls. This > > simplifies kernel checks to identify hotplug support for the currently > > loaded kdump image by just examining the value of @hotplug_support. > > > &g

Re: [PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-02-21 Thread Baoquan He
On 02/21/24 at 11:15am, Hari Bathini wrote: > Hi Baoquan, > > On 04/02/24 8:56 am, Baoquan He wrote: > > > > Hope Hari and Pingfan can help have a look, see if > > > > it's doable. Now, I make it either have both kexec and crash enabled, or > &

Re: [PATCHv7 07/16] x86/mm: Return correct level from lookup_address() if pte is none

2024-02-20 Thread Baoquan He
On 02/20/24 at 02:36pm, Kirill A. Shutemov wrote: > On Tue, Feb 20, 2024 at 06:25:43PM +0800, Baoquan He wrote: > > > I am not sure what part of the comment you see doesn't reflect the > > > behaviour. From my PoV, changed code matches the comment closer that > > > o

Re: [PATCH linux-next 1/3] kexec/kdump: make struct crash_mem available without CONFIG_CRASH_DUMP

2024-02-20 Thread Baoquan He
On 02/13/24 at 05:01pm, Hari Bathini wrote: > struct crash_mem defined under include/linux/crash_core.h represents > a list of memory ranges. While it is used to represent memory ranges >From its name, it's not only representing memory ranges, it's representing crash memory ranges. Except of

Re: [PATCHv7 07/16] x86/mm: Return correct level from lookup_address() if pte is none

2024-02-20 Thread Baoquan He
On 02/19/24 at 03:52pm, Kirill A. Shutemov wrote: > On Mon, Feb 19, 2024 at 01:12:32PM +0800, Baoquan He wrote: > > On 02/12/24 at 12:44pm, Kirill A. Shutemov wrote: > > > lookup_address() only returns correct page table level for the entry if > > > the entry is

Re: [PATCHv7 01/16] x86/acpi: Extract ACPI MADT wakeup code into a separate file

2024-02-19 Thread Baoquan He
On 02/19/24 at 12:08pm, Kirill A. Shutemov wrote: > On Mon, Feb 19, 2024 at 12:45:31PM +0800, Baoquan He wrote: > > Do we need add the entry printing for ACPI_MADT_TYPE_MULTIPROC_WAKEUP > > now in acpi_table_print_madt_entry()? Surely it's not related to this > > patch. >

Re: [PATCHv7 07/16] x86/mm: Return correct level from lookup_address() if pte is none

2024-02-18 Thread Baoquan He
92da8c9a86d..3612e3167147 100644 > --- a/arch/x86/mm/pat/set_memory.c > +++ b/arch/x86/mm/pat/set_memory.c > @@ -666,32 +666,32 @@ pte_t *lookup_address_in_pgd(pgd_t *pgd, unsigned long > address, LGTM, Reviewed-by: Baoquan He By the way, we may need update the code comment above fun

Re: [PATCHv7 02/16] x86/apic: Mark acpi_mp_wake_* variables as __ro_after_init

2024-02-18 Thread Baoquan He
On 02/12/24 at 12:44pm, Kirill A. Shutemov wrote: > acpi_mp_wake_mailbox_paddr and acpi_mp_wake_mailbox initialized once > during ACPI MADT init and never changed. > > Signed-off-by: Kirill A. Shutemov > Acked-by: Kai Huang Reviewed-by: Baoquan He > --- > arch/x86/kern

Re: [PATCHv7 01/16] x86/acpi: Extract ACPI MADT wakeup code into a separate file

2024-02-18 Thread Baoquan He
Giving up on wake up request and reporting error opens > + * possible attack vector for VMM: it can wake up a secondary CPU when > + * kernel doesn't expect it. Wait until positive result of the wake up > + * request. > + */ > + while (READ_ONCE(acpi

Re: [PATCH] kexec: should use uchunk for user buffer increasing

2024-02-18 Thread Baoquan He
; > At 2024-02-05 20:27:33, "Eric W. Biederman" wrote: > >Baoquan He writes: > > > >> On 01/30/24 at 06:18pm, yang.zhang wrote: > >>> From: "yang.zhang" > >>> > >>> Because of alignment requirement in kexec-too

Re: [PATCH v15 2/5] crash: add a new kexec flag for hotplug support

2024-02-12 Thread Baoquan He
On 02/12/24 at 07:27pm, Sourabh Jain wrote: > Hello Baoquan, > > On 05/02/24 08:40, Baoquan He wrote: > > Hi Sourabh, > > .. > > > diff --git a/include/linux/kexec.h b/include/linux/kexec.h > > > index 802052d9c64b..7880d74dc5c4 100644 > > >

Re: [PATCH linux-next] bpf: fix warning for crash_kexec

2024-02-09 Thread Baoquan He
> [1] https://lore.kernel.org/all/20240124051254.67105-1-...@redhat.com/ > > Signed-off-by: Hari Bathini > --- Good catch, thanks for fixing it. Acked-by: Baoquan He > kernel/bpf/helpers.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/bpf/helpers.

Re: [PATCH linux-next] bpf: fix warning for crash_kexec

2024-02-09 Thread Baoquan He
On 02/09/24 at 11:18am, Stanislav Fomichev wrote: > On 02/09, Hari Bathini wrote: > > With [1], CONFIG_KEXEC & !CONFIG_CRASH_DUMP is supported but that led > > to the below warning: > > > > "WARN: resolve_btfids: unresolved symbol crash_kexec" > > > > Fix it by using the appropriate #ifdef. >

Re: [PATCH] kexec: should use uchunk for user buffer increasing

2024-02-05 Thread Baoquan He
On 02/05/24 at 06:27am, Eric W. Biederman wrote: > Baoquan He writes: > > > On 01/30/24 at 06:18pm, yang.zhang wrote: > >> From: "yang.zhang" > >> > >> Because of alignment requirement in kexec-tools, there is > >> no problem for u

Re: [PATCH v15 1/5] crash: forward memory_notify arg to arch crash hotplug handler

2024-02-04 Thread Baoquan He
- > 4 files changed, 11 insertions(+), 10 deletions(-) LGTM, Acked-by: Baoquan He > > diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h > index c9f6a6c5de3c..9bb6607e864e 100644 > --- a/arch/x86/include/asm/kexec.h > +++ b/arch/x86/include/asm/kexec.h > @@ -

Re: [PATCH v15 2/5] crash: add a new kexec flag for hotplug support

2024-02-04 Thread Baoquan He
Hi Sourabh, Thanks for the great work. There are some concerns, please see inline comments. On 01/11/24 at 04:21pm, Sourabh Jain wrote: .. > Now, if the kexec tool sends KEXEC_CRASH_HOTPLUG_SUPPORT kexec flag to > the kernel, it indicates to the kernel that all the required kexec > segment

Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42`

2024-02-04 Thread Baoquan He
On 02/02/24 at 09:57am, Simon Horman wrote: > On Fri, Feb 02, 2024 at 12:16:38PM +0800, Baoquan He wrote: > > On 02/02/24 at 11:01am, Coiby Xu wrote: > > > Hi, > > > > > > FYI, before this patch, Michel already sent "[PATCH] Fix building on > >

Re: [PATCH] kexec: should use uchunk for user buffer increasing

2024-02-03 Thread Baoquan He
On 01/30/24 at 06:18pm, yang.zhang wrote: > From: "yang.zhang" > > Because of alignment requirement in kexec-tools, there is > no problem for user buffer increasing when loading segments. > But when coping, the step is uchunk, so we should use uchunk > not mchunk. In theory, ubytes is <=

Re: [PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-02-03 Thread Baoquan He
On 02/02/24 at 10:53am, Hari Bathini wrote: > Hi Baoquan, > > On 19/01/24 8:22 pm, Baoquan He wrote: > > Motivation: > > = > > Previously, LKP reported a building error. When investigating, it can't > > be resolved reasonablly with the

Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42`

2024-02-01 Thread Baoquan He
ete because two more > files are touched. Thanks for telling, I didn't notice that one. I didn't know these either, leave them to Sergei and Michel to decide what is the appropriate solution. > > On Wed, Jan 31, 2024 at 07:04:57PM +0800, Baoquan He wrote: > > On 01/31/24 at 10:05am

Re: [PATCHv6 00/16] x86/tdx: Add kexec support

2024-01-31 Thread Baoquan He
On 01/31/24 at 01:07pm, Huang, Kai wrote: > > > Runtime disabling kexec looks better than at cmpile time, esp for > > > distros. While from above patch, making using of kexec_load_disabled > > > to achive the runtime disabling may not be so good. Because we have a > > > front door to enable it

Re: [PATCHv6 00/16] x86/tdx: Add kexec support

2024-01-31 Thread Baoquan He
On 01/31/24 at 09:31am, Nikolay Borisov wrote: > > > On 30.01.24 г. 15:43 ч., Paolo Bonzini wrote: > > On 1/24/24 13:55, Kirill A. Shutemov wrote: > > > The patchset adds bits and pieces to get kexec (and crashkernel) work on > > > TDX guest. > > > > > > The last patch implements CPU offlining

Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42`

2024-01-31 Thread Baoquan He
from discussion in above link. Reviewed-by: Baoquan He > > Signed-off-by: Sergei Trofimovich > --- > purgatory/arch/i386/entry32-16-debug.S | 2 +- > purgatory/arch/i386/entry32-16.S | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/purgatory

Re: [PATCH linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
On 01/30/24 at 01:39am, Michael Kelley wrote: > From: Baoquan He > > > > On 01/29/24 at 06:27pm, Michael Kelley wrote: > > > From: Baoquan He Sent: Monday, January 29, 2024 > > 5:51 AM > > > > > > > > Michael pointed out that the #ifdef C

Re: [PATCH v2 linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
/T/#u Link: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- v1->v2: - Add missing words and fix typos in patch log pointed out by Michael. arch/x86/kernel/cpu/mshyperv.c | 10 ++ arch/x86/kernel/reboot.c | 2 +-

Re: [PATCH linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
On 01/29/24 at 06:27pm, Michael Kelley wrote: > From: Baoquan He Sent: Monday, January 29, 2024 5:51 AM > > > > Michael pointed out that the #ifdef CONFIG_CRASH_DUMP is nested inside > > arch/x86/xen/enlighten_hvm.c. > > Did some words get left out in the above sen

[PATCH linux-next 3/3] arch, crash: move arch_crash_save_vmcoreinfo() out to file vmcore_info.c

2024-01-29 Thread Baoquan He
es: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- arch/arm/kernel/Makefile | 1 + arch/arm/kernel/machine_kexec.c | 7 --- arch/arm/kernel/vmcore_info.c| 10 ++ arch/powerpc/kexec/Makefile | 1 + ar

[PATCH linux-next 1/3] x86, crash: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope

2024-01-29 Thread Baoquan He
einfo_note' Link: https://lore.kernel.org/all/sn6pr02mb4157931105fa68d72e3d3db8d4...@sn6pr02mb4157.namprd02.prod.outlook.com/T/#u Link: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- arch/x86/kernel/cpu/mshyperv.c | 10 ++

[PATCH linux-next 2/3] crash: fix building error in generic codes

2024-01-29 Thread Baoquan He
erorr when CONFIG_CRASH_DUMP is not set. Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/all/20240126045551.GA126645@dev-arch.thelio-3990X/T/#u Signed-off-by: Baoquan He --- drivers/of/kexec.c | 2 ++ kernel/kexec_file.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/of/kexec.c

Re: [PATCH linux-next v3 01/14] kexec: split crashkernel reservation code out from crash_core.c

2024-01-28 Thread Baoquan He
On 01/28/24 at 02:28am, Klara Modin wrote: > Hi, > > On 2024-01-24 06:12, Baoquan He wrote: > > And also add config item CRASH_RESERVE to control its enabling of the > > codes. And update config items which has relationship with crashkernel > > reservation. > > &

Re: [PATCH linux-next v3 00/14] Split crash out from kexec and clean up related config items

2024-01-25 Thread Baoquan He
On 01/25/24 at 09:55pm, Nathan Chancellor wrote: .. > I am seeing a few build failures in my test matrix on next-20240125 that > appear to be caused by this series although I have not bisected. Some > reproduction steps: Thanks for trying this, I have reproduced the linking failure on arm,

Re: [PATCH linux-next v3 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-25 Thread Baoquan He
On 01/25/24 at 05:12am, Michael Kelley wrote: > From: Baoquan He Sent: Wednesday, January 24, 2024 8:10 PM > > > > On 01/24/24 at 11:02pm, Michael Kelley wrote: > > > > diff --git a/arch/x86/kernel/cpu/mshyperv.c > > > > b/arch/x86/kernel/cpu/mshyperv.c &

Re: [PATCH linux-next v3 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-24 Thread Baoquan He
On 01/24/24 at 11:02pm, Michael Kelley wrote: > > diff --git a/arch/x86/kernel/cpu/mshyperv.c > > b/arch/x86/kernel/cpu/mshyperv.c > > index 01fa06dd06b6..f8163a59026b 100644 > > --- a/arch/x86/kernel/cpu/mshyperv.c > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > @@ -210,6 +210,7 @@ static void

Re: [PATCH linux-next v3 10/14] sh, crash: wrap crash dumping code into crash related ifdefs

2024-01-24 Thread Baoquan He
On 01/24/24 at 09:13am, John Paul Adrian Glaubitz wrote: > Hello Baoquan, > > On Wed, 2024-01-24 at 13:12 +0800, Baoquan He wrote: > > Now crash codes under kernel/ folder has been split out from kexec > > code, crash dumping can be separated from kexec reboot in confi

[PATCH linux-next v3 11/14] mips, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
-by: Baoquan He --- arch/mips/kernel/setup.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 9c30de151597..12a1a4ffb602 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -442,8 +442,6

[PATCH linux-next v3 12/14] riscv, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
if compiling in the crashkernel reservation code. Signed-off-by: Baoquan He --- arch/riscv/kernel/elf_kexec.c | 9 +++-- arch/riscv/mm/init.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/riscv/kernel/elf_kexec.c b/arch/riscv/kernel/elf_kexec.c index

[PATCH linux-next v3 09/14] s390, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on s390 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/s390/kernel/kexec_elf.c

[PATCH linux-next v3 10/14] sh, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
if compiling in the crashkernel reservation code. Signed-off-by: Baoquan He --- arch/sh/kernel/machine_kexec.c | 3 +++ arch/sh/kernel/setup.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index fa3a7b36190a

[PATCH linux-next v3 07/14] arm64, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on arm64 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/arm64/include/asm

[PATCH linux-next v3 14/14] loongarch, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
-by: Baoquan He --- v2->v3: - Update code change regarding below commit: commit 78de91b45860 ("LoongArch: Use generic interface to support crashkernel=X,[high,low]") arch/loongarch/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/ker

[PATCH linux-next v3 13/14] arm, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on arm with some adjustments. Here use CONFIG_CRASH_RESERVE ifdef to replace CONFIG_KEXEC ifdef. Signed-off-by: Baoquan He --- v2->v3: - Fix the lkp repor

[PATCH linux-next v3 08/14] ppc, crash: enforce KEXEC and KEXEC_FILE to select CRASH_DUMP

2024-01-23 Thread Baoquan He
In PowerPC, the crash dumping and kexec reboot share code in arch_kexec_locate_mem_hole(), in which struct crash_mem is used. Here enfoce enforce KEXEC and KEXEC_FILE to select CRASH_DUMP for now. Signed-off-by: Baoquan He --- arch/powerpc/Kconfig | 5 + 1 file changed, 5 insertions

[PATCH linux-next v3 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-23 Thread Baoquan He
def CONFIG_CRASH_DUMP - (!IS_ENABLED(CONFIG_KEXEC_CORE)) - > (!IS_ENABLED(CONFIG_CRASH_RESERVE)) Signed-off-by: Baoquan He --- arch/x86/kernel/Makefile | 4 ++-- arch/x86/kernel/cpu/mshyperv.c | 4 arch/x86/kernel/kexec-bzimage64.c | 4 arch/x86/kernel/kvm.c

[PATCH linux-next v3 04/14] crash: split crash dumping code out from kexec_core.c

2024-01-23 Thread Baoquan He
-by: Baoquan He --- drivers/base/cpu.c | 6 +- include/linux/crash_core.h | 61 + include/linux/kexec.h | 45 +-- init/initramfs.c | 2 +- kernel/Makefile| 3 +- kernel/crash_core.c| 256 + kernel

[PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-01-23 Thread Baoquan He
->PROC_VMCORE KEXEC_FILE --| \ | \>CRASH_HOTPLUG KEXEC --| |--> KEXEC_CORE--> kexec reboot KEXEC_FILE --| Signed-off-by: Baoquan He --- kernel/Kconfig.kexec | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec ind

[PATCH linux-next v3 03/14] crash: remove dependency of FA_DUMP on CRASH_DUMP

2024-01-23 Thread Baoquan He
CONFIG_VMCORE_INFO is ebabled. With this, FA_DUMP doesn't need to depend on CRASH_DUMP. Signed-off-by: Baoquan He --- arch/powerpc/Kconfig | 1 - kernel/Makefile | 3 +-- kernel/{crash_dump.c => elfcorehdr.c} | 0 kernel/kexec_internal.h | 2 ++ 4 fi

[PATCH linux-next v3 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-01-23 Thread Baoquan He
do renaming as follows: - arch/xxx/kernel/{crash_core.c => vmcore_info.c} because they are only related to vmcoreinfo exporting on x86, arm64, riscv. And also Remove config item CRASH_CORE, and rely on CONFIG_KEXEC_CORE to decide if build in crash_core.c. Signed-off-by: Baoquan He --- v2-

[PATCH linux-next v3 01/14] kexec: split crashkernel reservation code out from crash_core.c

2024-01-23 Thread Baoquan He
nly related to crashkernel reservation. Signed-off-by: Baoquan He --- arch/arm64/Kconfig| 2 +- .../asm/{crash_core.h => crash_reserve.h} | 4 +- arch/powerpc/Kconfig | 1 + arch/powerpc/mm/nohash/kaslr_booke.c | 4 +- arch

[PATCH linux-next v3 00/14] Split crash out from kexec and clean up related config items

2024-01-23 Thread Baoquan He
ASH_RESERVE) checking in v2. - In patch 14, update code change after below commit merged into mainline: - commit 78de91b45860 ("LoongArch: Use generic interface to support crashkernel=X,[high,low]") Baoquan He (14): kexec: split crashkernel reservation code out from crash_core.c

Re: [PATCH v2 11/14] arm, crash: wrap crash dumping code into crash related ifdefs

2024-01-20 Thread Baoquan He
If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/k

[PATCH v2 14/14] loongarch, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
if compiling in the crashkernel reservation code. Signed-off-by: Baoquan He --- arch/loongarch/kernel/setup.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c index d183a745fb85..61f88dd97947 100644

[PATCH v2 12/14] mips, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
-by: Baoquan He --- arch/mips/kernel/setup.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 9c30de151597..12a1a4ffb602 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -442,8 +442,6

[PATCH v2 09/14] s390, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on s390 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/s390/kernel/kexec_elf.c

[PATCH v2 11/14] arm, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
-by: Baoquan He --- arch/arm/kernel/setup.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index ff2299ce1ad7..cf0b3798179f 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -979,7 +979,6 @@ static int __init

[PATCH v2 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
def CONFIG_CRASH_DUMP - (!IS_ENABLED(CONFIG_KEXEC_CORE)) - > (!IS_ENABLED(CONFIG_CRASH_RESERVE)) Signed-off-by: Baoquan He --- arch/x86/kernel/Makefile | 4 ++-- arch/x86/kernel/cpu/mshyperv.c | 4 arch/x86/kernel/kexec-bzimage64.c | 4 arch/x86/kernel/kvm.c

[PATCH v2 07/14] arm64, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on arm64 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/arm64/include/asm

  1   2   3   4   5   6   7   8   9   10   >