[PATCH v9 1/8] kexec_file: allow to place kexec_buf randomly
Breno Leitao
leitao at debian.org
Wed Aug 27 06:38:35 PDT 2025
On Wed, Aug 27, 2025 at 07:38:29PM +0800, Baoquan He wrote:
> On 08/25/25 at 06:05pm, Andrew Morton wrote:
> > On Mon, 25 Aug 2025 09:18:53 +0800 Coiby Xu <coxu at redhat.com> wrote:
> >
> > > >diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_image.c
> > > >index 532d72ea42ee8..287b25e674d76 100644
> > > >--- a/arch/arm64/kernel/kexec_image.c
> > > >+++ b/arch/arm64/kernel/kexec_image.c
> > > >@@ -76,6 +76,7 @@ static void *image_load(struct kimage *image,
> > > > kbuf.buf_min = 0;
> > > > kbuf.buf_max = ULONG_MAX;
> > > > kbuf.top_down = false;
> > > >+ kbuf.random = 0;
> > > >
> > > > kbuf.buffer = kernel;
> > > > kbuf.bufsz = kernel_len;
> > > >
> > >
> > > And also thanks for posing a fix! The patch LGTM. Can you add a Fixes
> > > tag 'Fixes: bf454ec31add ("kexec_file: allow to place kexec_buf
> > > randomly")' and then send it to kexec at lists.infradead.org? Thanks!
> >
> > I turned all this into a regular patch and queued it (see below),
> > thanks. No additional actions are needed.
> >
> > I'm really not liking that code. I laboriously verified that all
> > fields of kexec_buf are now initialized, except for `cma'. Is that a
> > bug?
> >
> > This function has a call frequency of about 3x per week. Can we please
> > just memset the whole thing so people don't have to worry about this
> > any more?
>
> Yeah, adding these trivial patches to mute XXSAN warning is annoying.
The patchset is quite simple, tho:
https://lore.kernel.org/all/20250827-kbuf_all-v1-0-1df9882bb01a@debian.org/
More information about the linux-arm-kernel
mailing list