[PATCH v3 3/5] kho: skip zero-sized lowmem and global bootmem areas

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Nov 12 02:47:51 PST 2026


> The lowmem and the global bootmem areas can have zero size, for example
> when none or all of the memory is below ARCH_LOW_ADDRESS_LIMIT, or when
> either of those areas is explicitly set to zero with kho_bootmem=.
> 
> For a zero-sized allocation memblock returns an address without reserving
> anything, and that empty area is recorded in kho_bootmem. If there is no
> memory below ARCH_LOW_ADDRESS_LIMIT, allocation of the empty lowmem area
> fails and KHO gets disabled.
> 
> Extract a helper that checks for zero size and allocates memory from
> memblock, and use it to skip empty areas the same way as empty per-node
> areas are skipped.
> 
> Fixes: 3dc92c311498 ("kexec: add Kexec HandOver (KHO) generation helpers")
> Reported-by: Chen Pei <cp0613 at linux.alibaba.com>
> Closes: https://lore.kernel.org/all/20261026131851.9942-1-cp0613@linux.alibaba.com
> Reviewed-by: Pasha Tatashin <pasha.tatashin at soleen.com>
> Reviewed-by: Jose A. Perez de Azpillaga <azpijr at gmail.com>
> Reviewed-by: Pratyush Yadav <pratyush at kernel.org>
> Reviewed-by: Mukesh Pilaniya <mpilaniy at redhat.com>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt at kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-kho-bootmem-sizing-v3-0-f0c8d00295d5@kernel.org?part=3




More information about the kexec mailing list