[PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o

2023-11-30 Thread Baoquan He
This was introduced in commit fba8a8674f68 ("RISC-V: Add kexec support"). It should work on CONFIG_KEXEC_CORE, but not CONFIG_KEXEC only, since we could set CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=N, or only set CONFIG_CRASH_DUMP=y and disable both CONFIG_KEXEC and CONFIG_KEXEC_FILE. In these cases,

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-30 Thread Pingfan Liu
On Thu, Nov 30, 2023 at 9:43 PM Michal Hocko wrote: > > On Thu 30-11-23 21:33:04, Pingfan Liu wrote: > > On Thu, Nov 30, 2023 at 9:29 PM Michal Hocko wrote: > > > > > > On Thu 30-11-23 20:04:59, Baoquan He wrote: > > > > On 11/30/23 at 11:16am, Michal Hocko wrote: > > > > > On Thu 30-11-23 11:00:

Re: [PATCH 1/2] kexec: fix KEXEC_FILE dependencies

2023-11-30 Thread Eric DeVolder
On 11/30/23 10:56, Andrew Morton wrote: On Thu, 2 Nov 2023 16:03:18 +0800 Baoquan He wrote: CONFIG_KEXEC_FILE, but still get purgatory code built in which is totally useless. Not sure if I think too much over this. I see your point here, and I would suggest changing the CONFIG_ARCH_SUPPORTS

Re: [PATCH 1/2] kexec: fix KEXEC_FILE dependencies

2023-11-30 Thread Andrew Morton
On Thu, 2 Nov 2023 16:03:18 +0800 Baoquan He wrote: > > > CONFIG_KEXEC_FILE, but still get purgatory code built in which is > > > totally useless. > > > > > > Not sure if I think too much over this. > > > > I see your point here, and I would suggest changing the > > CONFIG_ARCH_SUPPORTS_KEXEC_PU

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-30 Thread Michal Hocko
On Thu 30-11-23 20:31:44, Baoquan He wrote: [...] > > > which doesn't use the proper pinning API (which would migrate away from > > > the CMA) then what is the worst case? We will get crash kernel corrupted > > > potentially and fail to take a proper kernel crash, right? Is this > > > worrisome? Ye

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-30 Thread Michal Hocko
On Thu 30-11-23 21:33:04, Pingfan Liu wrote: > On Thu, Nov 30, 2023 at 9:29 PM Michal Hocko wrote: > > > > On Thu 30-11-23 20:04:59, Baoquan He wrote: > > > On 11/30/23 at 11:16am, Michal Hocko wrote: > > > > On Thu 30-11-23 11:00:48, Baoquan He wrote: > > > > [...] > > > > > Now, we are worried i

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-30 Thread Pingfan Liu
On Thu, Nov 30, 2023 at 9:29 PM Michal Hocko wrote: > > On Thu 30-11-23 20:04:59, Baoquan He wrote: > > On 11/30/23 at 11:16am, Michal Hocko wrote: > > > On Thu 30-11-23 11:00:48, Baoquan He wrote: > > > [...] > > > > Now, we are worried if there's risk if the CMA area is retaken into > > > > kdu

Re: [PATCH] kexec: avoid out of bounds in crash_exclude_mem_range()

2023-11-30 Thread fuqiang wang
On 2023/11/30 15:44, Baoquan He wrote: On 11/27/23 at 10:56am, fuqiang wang wrote: When the split happened, judge whether mem->nr_ranges is equal to mem->max_nr_ranges. If it is true, return -ENOMEM. The advantage of doing this is that it can avoid array bounds caused by some bugs. E.g., Befor

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-30 Thread Baoquan He
Hi Michal, On 11/30/23 at 08:04pm, Baoquan He wrote: > On 11/30/23 at 11:16am, Michal Hocko wrote: > > On Thu 30-11-23 11:00:48, Baoquan He wrote: > > [...] > > > Now, we are worried if there's risk if the CMA area is retaken into kdump > > > kernel as system RAM. E.g is it possible that 1st kerne

Re: [PATCH 0/4] kdump: crashkernel reservation from CMA

2023-11-30 Thread Baoquan He
On 11/30/23 at 11:16am, Michal Hocko wrote: > On Thu 30-11-23 11:00:48, Baoquan He wrote: > [...] > > Now, we are worried if there's risk if the CMA area is retaken into kdump > > kernel as system RAM. E.g is it possible that 1st kernel's ongoing RDMA > > or DMA will interfere with kdump kernel's n