All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Kiryl Shutsemau <kas@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>,
	 Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Miaohe Lin <linmiaohe@huawei.com>,
	 Naoya Horiguchi <nao.horiguchi@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,  rmikey@meta.com, riel@surriel.com,
	kexec@lists.infradead.org,  kernel-team@meta.com
Subject: Re: [PATCH v2 6/6] efi: respect the poisoned pages coming from previous kernel
Date: Fri, 21 Aug 2026 09:43:37 -0700	[thread overview]
Message-ID: <aoh-3XJw82O8SmsA@gmail.com> (raw)
In-Reply-To: <aohldTtzE2GJ76md@thinkstation>

On Fri, Aug 21, 2026 at 03:53:32PM +0100, Kiryl Shutsemau wrote:
> On Fri, Aug 21, 2026 at 07:03:06AM -0700, Breno Leitao wrote:
> > On Fri, Aug 21, 2026 at 01:13:55PM +0100, Kiryl Shutsemau wrote:
> > > 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.
> > 
> > You mean the third kexec?
> > 
> > 1) Kernel A hits an ECC error and marks page X poisoned.
> > 2) Kernel A kexecs into kernel B, which won't use that page since
> >    it's in EFI_POISONED_PAGE and memblock-reserved.
> > 3) Kernel B kexecs into kernel C, which doesn't respect
> >    EFI_POISONED_PAGE.
> > 
> > Is this the scenario you mean?
> 
> No. I think nothing prevents kernel B from putting kernel C image into
> the reserved space in !CONFIG_ARCH_KEEP_MEMBLOCK case.
> 
> Kernel B excludes poisoned memory from buddy allocator, but kexec
> doesn't care about this when look for placement for the next image.

Right, that is exactly the case I meant above — sorry for not being
clearer.

Agreed, this is a gap.

Can we keep it separate for now and address it as a follow-up? Similar
to the one covered the initial issue [1] first.

Link: https://lore.kernel.org/all/20260812-kexec_posioned-v6-0-e477887086f0@debian.org/ [1]


  reply	other threads:[~2026-08-21 16:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 10:06 [PATCH v2 0/6] efi: mm/memory-failure: keep hardware-poisoned pages out of the next kexec Breno Leitao
2026-08-21 10:06 ` [PATCH v2 1/6] efi/libstub: add a helper for the top of usable RAM Breno Leitao
2026-08-21 11:04   ` Kiryl Shutsemau
2026-08-21 10:06 ` [PATCH v2 2/6] efi: add the LINUX_EFI_POISONED_MEMORY configuration table Breno Leitao
2026-08-21 11:51   ` Kiryl Shutsemau
2026-08-21 12:03     ` Pratyush Yadav
2026-08-21 14:11       ` Breno Leitao
2026-08-21 14:04     ` Breno Leitao
2026-08-21 10:06 ` [PATCH v2 3/6] efi/libstub: add the poisoned-memory EFI table Breno Leitao
2026-08-21 10:06 ` [PATCH v2 4/6] efi/libstub: install the poisoned-memory table from the stub Breno Leitao
2026-08-21 10:06 ` [PATCH v2 5/6] efi: record hardware-poisoned frames into the poisoned-memory table Breno Leitao
2026-08-21 10:06 ` [PATCH v2 6/6] efi: respect the poisoned pages coming from previous kernel Breno Leitao
2026-08-21 12:13   ` Kiryl Shutsemau
2026-08-21 14:03     ` Breno Leitao
2026-08-21 14:53       ` Kiryl Shutsemau
2026-08-21 16:43         ` Breno Leitao [this message]
2026-08-24 10:32           ` Kiryl Shutsemau
2026-08-24 13:03             ` Breno Leitao
2026-08-24 15:19               ` Kiryl Shutsemau
2026-08-21 10:29 ` [PATCH v2 0/6] efi: mm/memory-failure: keep hardware-poisoned pages out of the next kexec Kiryl Shutsemau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aoh-3XJw82O8SmsA@gmail.com \
    --to=leitao@debian.org \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kas@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kexec@lists.infradead.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nao.horiguchi@gmail.com \
    --cc=riel@surriel.com \
    --cc=rmikey@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.