[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1659446A-F17C-4FF2-BE1B-3EC37520DDCB@amazon.com>
Date: Thu, 11 Sep 2025 15:30:19 +0000
From: "Bouron, Justinien" <jbouron@...zon.com>
To: Baoquan He <bhe@...hat.com>
CC: Andrew Morton <akpm@...ux-foundation.org>, "Rafael J . Wysocki"
<rafael.j.wysocki@...el.com>, Petr Mladek <pmladek@...e.com>, "Mario
Limonciello" <mario.limonciello@....com>, Marcos Paulo de Souza
<mpdesouza@...e.com>, "Graf (AWS), Alexander" <graf@...zon.de>, Steven Chen
<chenste@...ux.microsoft.com>, Yan Zhao <yan.y.zhao@...el.com>,
"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Kudrjavets,
Gunnar" <gunnarku@...zon.com>
Subject: Re: [PATCH] kexec_core: Remove superfluous page offset handling in segment
loading
On 9/11/25, 02:42, "Baoquan He" <bhe@...hat.com <mailto:bhe@...hat.com>> wrote:
> Do you mean we will adjust the memsz and buf_align to PAGE_SIZE aligned
> in kexec_add_buffer()?
That and mostly the fact that `sanity_check_segment_list()` explicitely rejects
any segment that either does not start or end on a page boundary:
int sanity_check_segment_list(struct kimage *image)
{
// ...
for (i = 0; i < nr_segments; i++) {
unsigned long mstart, mend;
mstart = image->segment[i].mem;
mend = mstart + image->segment[i].memsz;
if (mstart > mend)
return -EADDRNOTAVAIL;
if ((mstart & ~PAGE_MASK) || (mend & ~PAGE_MASK))
return -EADDRNOTAVAIL;
if (mend >= KEXEC_DESTINATION_MEMORY_LIMIT)
return -EADDRNOTAVAIL;
}
// ...
}
> That better be explained in log.
Does it warrant a second revision to change the log?
Thanks,
Justinien
Powered by blists - more mailing lists