From: Pratyush Yadav <pratyush@kernel.org>
To: sashiko-bot@kernel.org
Cc: "Pratyush Yadav" <pratyush@kernel.org>,
"Mike Rapoport" <rppt@kernel.org>,
"Pasha Tatashin" <pasha.tatashin@soleen.com>,
"Alexander Graf" <graf@amazon.com>,
sashiko-reviews@lists.linux.dev, kexec@lists.infradead.org,
"Bing Jiao" <bingjiao@google.com>
Subject: Re: [PATCH] kho: do not reserve empty per-node bootmem areas
Date: Wed, 14 Oct 2026 15:39:10 +0200 [thread overview]
Message-ID: <2vxzecdsiept.fsf@kernel.org> (raw)
In-Reply-To: <sashiko-outbox-171352@kernel.org> (sashiko-bot@kernel.org's message of "Wed, 14 Oct 2026 13:27:27 +0000")
On Wed, Oct 14 2026, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] kho: incomplete fix for zero-size memblock allocations in bootmem
> --
>
> commit 67ab500bd948f5a3b52f1c8170626cb8f1dfc6c3
> Author: Pratyush Yadav (Google) <pratyush@kernel.org>
>
> kho: do not reserve empty per-node bootmem areas
>
> Some nodes do not allocate any early boot memory, causing memblock to
> return an address without reserving anything when requested with zero size.
> This address is recorded in kho_bootmem with a size of 0, and can cause KHO
> to fail to initialize. This patch skips bootmem reservation for memoryless
> nodes entirely.
>
>> diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
>> index 7018e25e4eda1..6f1f55fe31819 100644
>> --- a/kernel/liveupdate/kexec_handover.c
>> +++ b/kernel/liveupdate/kexec_handover.c
>
> [ ... ]
>
>> @@ -882,6 +882,9 @@ static void __init kho_reserve_bootmem(void)
>> */
>> for_each_node_state(nid, N_MEMORY) {
>> size = bootmem_size_node(nid);
>> + if (!size)
>> + continue;
>> +
>> addr = memblock_alloc_range_nid(size, BOOTMEM_ALIGNMENT_BYTES,
>
> [Severity: High]
> This adds a zero-size check for per-node bootmem allocations, but does the
> same issue exist for bootmem_size_lowmem and bootmem_size_global?
Valid point, but that should be solved by the general bootmem sizing
patches being developed separately.
[...]
--
Regards,
Pratyush Yadav
prev parent reply other threads:[~2026-10-14 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 13:15 [PATCH] kho: do not reserve empty per-node bootmem areas Pratyush Yadav
2026-10-14 13:27 ` sashiko-bot
2026-10-14 13:39 ` Pratyush Yadav [this message]
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=2vxzecdsiept.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=bingjiao@google.com \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=pasha.tatashin@soleen.com \
--cc=rppt@kernel.org \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox