Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>, Brian Mak <makb@juniper.net>
Cc: Dave Young <dyoung@redhat.com>, Alexander Graf <graf@amazon.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Rob Herring <robh@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	x86@kernel.org, kexec@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] kexec: Add KEXEC_FILE_NO_CMA as a legal flag
Date: Thu, 21 Aug 2025 16:33:26 +0800	[thread overview]
Message-ID: <aKbZ1h5mjtfoFMh8@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20250820214756.5c7b551e4723d9f0b5dd55e3@linux-foundation.org>

On 08/20/25 at 09:47pm, Andrew Morton wrote:
> On Tue, 5 Aug 2025 14:15:26 -0700 Brian Mak <makb@juniper.net> wrote:
> 
> > Commit 07d24902977e ("kexec: enable CMA based contiguous allocation")
> > introduces logic to use CMA-based allocation in kexec by default. As
> > part of the changes, it introduces a kexec_file_load flag to disable the
> > use of CMA allocations from userspace. However, this flag is broken
> > since it is missing from the list of legal flags for kexec_file_load.
> > kexec_file_load returns EINVAL when attempting to use the flag.
> > 
> > Fix this by adding the KEXEC_FILE_NO_CMA flag to the list of legal flags
> > for kexec_file_load.
> > 
> > Fixes: 07d24902977e ("kexec: enable CMA based contiguous allocation")
> 
> A description of the userspace-visible runtime effects of this bug
> would be very helpful, please.  A lot more than "is broken"!
> 
> Also, could we please have some reviewer input on this change?

I didn't receive this patchset, and kexec mailing list is not in CC.
I don't know what happened.

> 
> 
> > --- a/include/linux/kexec.h
> > +++ b/include/linux/kexec.h
> > @@ -460,7 +460,8 @@ bool kexec_load_permitted(int kexec_image_type);
> >  
> >  /* List of defined/legal kexec file flags */
> >  #define KEXEC_FILE_FLAGS	(KEXEC_FILE_UNLOAD | KEXEC_FILE_ON_CRASH | \
> > -				 KEXEC_FILE_NO_INITRAMFS | KEXEC_FILE_DEBUG)
> > +				 KEXEC_FILE_NO_INITRAMFS | KEXEC_FILE_DEBUG | \
> > +				 KEXEC_FILE_NO_CMA)
> >  
> >  /* flag to track if kexec reboot is in progress */
> >  extern bool kexec_in_progress;
> > -- 
> > 2.25.1
> > 
> 



  reply	other threads:[~2025-08-21 10:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 21:15 [PATCH v2 0/2] x86/kexec: Carry forward the boot DTB on kexec Brian Mak
2025-08-05 21:15 ` [PATCH v2 1/2] kexec: Add KEXEC_FILE_NO_CMA as a legal flag Brian Mak
2025-08-21  4:47   ` Andrew Morton
2025-08-21  8:33     ` Baoquan He [this message]
2025-08-21 11:53       ` Andrew Morton
2025-08-22  3:33         ` Baoquan He
2025-08-25 18:49           ` Brian Mak
2025-09-04 19:58             ` Brian Mak
2025-09-09  6:33               ` Baoquan He
2025-08-21 16:22     ` Brian Mak
2025-08-05 21:15 ` [PATCH v2 2/2] x86/kexec: Carry forward the boot DTB on kexec Brian Mak
2025-08-12 18:00 ` [PATCH v2 0/2] " Brian Mak
2025-08-13  3:54   ` Dave Young
2025-08-13 19:24     ` Brian Mak
2025-08-14  2:39       ` Baoquan He

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=aKbZ1h5mjtfoFMh8@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dyoung@redhat.com \
    --cc=graf@amazon.com \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=makb@juniper.net \
    --cc=mingo@redhat.com \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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