Re: [PATCH] kexec: Fix kexec_locate_mem_hole() for missing CONFIG_KEXEC_HANDOVER

From: Andrew Morton
Date: Fri Feb 14 2025 - 18:47:28 EST


On Fri, 14 Feb 2025 18:24:02 +0530 Sourabh Jain <sourabhjain@xxxxxxxxxxxxx> wrote:

> While adding KHO support, commit 7d128945e003 ("kexec: add KHO support
> to kexec file loads") returns early from kexec_locate_mem_hole() if
> CONFIG_KEXEC_HANDOVER is not defined.
>
> Due to this, kexec_locate_mem_hole() does not locate a hole for the
> kexec segment, and kbuf.mem holds 0x0. This leads to a kexec_file_load
> syscall failure in sanity_check_segment_list(). This impacts both
> kexec and kdump kernels.

Thanks.

Mike, I'll remove the v4 series from mm-unstable to gie you a clean
shot at v5. Please incorporate Sourabh's fix?