lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250820214756.5c7b551e4723d9f0b5dd55e3@linux-foundation.org>
Date: Wed, 20 Aug 2025 21:47:56 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Brian Mak <makb@...iper.net>
Cc: Baoquan He <bhe@...hat.com>, Dave Young <dyoung@...hat.com>, Alexander
 Graf <graf@...zon.com>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar
 <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
 <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>, Rob
 Herring <robh@...nel.org>, Saravana Kannan <saravanak@...gle.com>,
 <x86@...nel.org>, <kexec@...ts.infradead.org>,
 <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] kexec: Add KEXEC_FILE_NO_CMA as a legal flag

On Tue, 5 Aug 2025 14:15:26 -0700 Brian Mak <makb@...iper.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?

Thanks.

> --- 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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ