From: Brian Mak <makb@juniper.net>
To: Baoquan He <bhe@redhat.com>, 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>,
Andrew Morton <akpm@linux-foundation.org>,
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>
Cc: Brian Mak <makb@juniper.net>
Subject: [PATCH v2 1/2] kexec: Add KEXEC_FILE_NO_CMA as a legal flag
Date: Tue, 5 Aug 2025 14:15:26 -0700 [thread overview]
Message-ID: <20250805211527.122367-2-makb@juniper.net> (raw)
In-Reply-To: <20250805211527.122367-1-makb@juniper.net>
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")
Signed-off-by: Brian Mak <makb@juniper.net>
---
include/linux/kexec.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index 1b10a5d84b68..39fe3e6cd282 100644
--- 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
next prev parent reply other threads:[~2025-08-05 21:20 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 ` Brian Mak [this message]
2025-08-21 4:47 ` [PATCH v2 1/2] kexec: Add KEXEC_FILE_NO_CMA as a legal flag Andrew Morton
2025-08-21 8:33 ` Baoquan He
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=20250805211527.122367-2-makb@juniper.net \
--to=makb@juniper.net \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--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=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