[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <enzwdtceeqzkb5twhp3lcslzwbfz2xvam2cxo76gnsljlh6cx3@2nzp7lm2hoo4>
Date: Wed, 27 Aug 2025 06:38:35 -0700
From: Breno Leitao <leitao@...ian.org>
To: Baoquan He <bhe@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Coiby Xu <coxu@...hat.com>,
kexec@...ts.infradead.org, Ondrej Kozina <okozina@...hat.com>,
Milan Broz <gmazyland@...il.com>, Thomas Staudt <tstaudt@...ibm.com>,
Daniel P . Berrangé <berrange@...hat.com>, Kairui Song <ryncsn@...il.com>,
Pingfan Liu <kernelfans@...il.com>, Dave Young <dyoung@...hat.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, Dave Hansen <dave.hansen@...el.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>, Arnaud Lefebvre <arnaud.lefebvre@...ver-cloud.com>,
Jan Pazdziora <jpazdziora@...hat.com>, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v9 1/8] kexec_file: allow to place kexec_buf randomly
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@...hat.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@...ts.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/
Powered by blists - more mailing lists