The patch titled Subject: powerpc/crash: preserve user-specified memory limit has been added to the -mm mm-nonmm-unstable branch. Its filename is powerpc-crash-preserve-user-specified-memory-limit.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/powerpc-crash-preserve-user-specified-memory-limit.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Sourabh Jain <sourabhjain@xxxxxxxxxxxxx> Subject: powerpc/crash: preserve user-specified memory limit Date: Fri, 31 Jan 2025 17:08:28 +0530 Commit 59d58189f3d9 ("crash: fix crash memory reserve exceed system memory bug") fails crashkernel parsing if the crash size is found to be higher than system RAM, which makes the memory_limit adjustment code ineffective due to an early exit from reserve_crashkernel(). Regardless lets not violate the user-specified memory limit by adjusting it. Remove this adjustment to ensure all reservations stay within the limit. Commit f94f5ac07983 ("powerpc/fadump: Don't update the user-specified memory limit") did the same for fadump. Link: https://lkml.kernel.org/r/20250131113830.925179-6-sourabhjain@xxxxxxxxxxxxx Signed-off-by: Sourabh Jain <sourabhjain@xxxxxxxxxxxxx> Reviewed-by: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxx> Acked-by: Hari Bathini <hbathini@xxxxxxxxxxxxx> Cc: Baoquan he <bhe@xxxxxxxxxx> Cc: Madhavan Srinivasan <maddy@xxxxxxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/powerpc/kexec/core.c | 8 -------- 1 file changed, 8 deletions(-) --- a/arch/powerpc/kexec/core.c~powerpc-crash-preserve-user-specified-memory-limit +++ a/arch/powerpc/kexec/core.c @@ -128,14 +128,6 @@ void __init reserve_crashkernel(void) return; } - /* Crash kernel trumps memory limit */ - if (memory_limit && memory_limit <= crashk_res.end) { - memory_limit = crashk_res.end + 1; - total_mem_sz = memory_limit; - printk("Adjusted memory limit for crashkernel, now 0x%llx\n", - memory_limit); - } - printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " "for crashkernel (System RAM: %ldMB)\n", (unsigned long)(crash_size >> 20), _ Patches currently in -mm which might be from sourabhjain@xxxxxxxxxxxxx are kexec-initialize-elf-lowest-address-to-ulong_max.patch crash-remove-an-unused-argument-from-reserve_crashkernel_generic.patch crash-let-arch-decide-usable-memory-range-in-reserved-area.patch powerpc-crash-use-generic-apis-to-locate-memory-hole-for-kdump.patch powerpc-crash-preserve-user-specified-memory-limit.patch powerpc-insert-system-ram-resource-to-prevent-crashkernel-conflict.patch powerpc-crash-use-generic-crashkernel-reservation.patch