Re: [PATCH v2 2/6] efi: add the LINUX_EFI_POISONED_MEMORY configuration table

Breno Leitao <[email protected]>
Newsgroups org.kernel.vger.linux-efi,org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
Hello Pratyush,

On Fri, Aug 21, 2026 at 02:03:30PM +0200, Pratyush Yadav wrote:
> >> +config EFI_POISONED_MEMORY
> >> +	bool "Carry hardware-poisoned pages across kexec"
> >> +	depends on EFI_STUB && MEMORY_FAILURE && 64BIT
> >> +	help
> >> +	  Record page frames that are hardware-poisoned while this kernel runs
> >> +	  into an EFI configuration table, and honor that table early on the
> >> +	  next kernel so a kexec does not hand known-bad RAM back out.
> >> +
> >> +	  If unsure, say N.
> >> +
> >
> > Do we want to make it conditional? Maybe just for everyone with EFI_STUB
> > && MEMORY_FAILURE?
>
> +1. Each config we add is a decision someone has to make when compiling
> the kernel. If they rely on the default, they will miss out on this
> fairly useful feature.
>
> So, is there any downside to just doing this by default without any
> config?

The only downside I see is that this extra config table gets carved
out of main memory for every MEMORY_FAILURE user.

That is roughly 64 KiB per TiB of RAM, though, so maybe it is small
enough to just enable by default?!

Thanks for the review,
--breno
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.