Re: [PATCH v2 6/6] efi: respect the poisoned pages coming from previous kernel

Kiryl Shutsemau <[email protected]>
Newsgroups org.kernel.vger.linux-efi,org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <aog_uH5fTsJzXjjx@thinkstation>
On Fri, Aug 21, 2026 at 03:06:06AM -0700, Breno Leitao wrote:
> +	/* Reserve the table itself so it survives a further kexec. */
> +	memblock_reserve(PAGE_ALIGN_DOWN(ppm),
> +			 PAGE_ALIGN(ppm + sizeof(*pm) + bitmap_size) -
> +			 PAGE_ALIGN_DOWN(ppm));

Hm. I don't think it is enough.

On x86, kernel doesn't keep memblock around after boot (see
CONFIG_ARCH_KEEP_MEMBLOCK). Reserving in memblock exclude the memory
from page allocator. But kexec can place the image there.

For !CONFIG_ARCH_KEEP_MEMBLOCK, kexec uses walk_system_ram_res() that
looks into iomem_resource. And memblock does nothing to exclude the
memory from iomem_resource.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.