Re: [PATCH v2] kexec: keep the next kernel off hardware-poisoned pages

Breno Leitao <[email protected]>
Newsgroups org.kvack.linux-mm,org.infradead.lists.kexec,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Fri, Jul 31, 2026 at 07:49:27PM +0200, Pratyush Yadav wrote:
> > + * return phys_addr_t, thus this "extra" parameter, instead of returning
> > + * the hit.
> > + */
> > +bool range_contains_hwpoison(phys_addr_t start, unsigned long size,
> > +			     phys_addr_t *poison)
> 
> Perhaps
> 
>     phys_addr_t range_last_hwpoison(phys_addr_t start, unsigned long size)  ?
> 
> And if no poisoned page lands here then a default of 0 or ~0UL?

That was my initial preference, but hypothetically phys_addr_t 0 could be
a poisoned page.

I hadn't considered ~0UL as a sentinel — that should work and is a good
suggestion. let me prototype.

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.