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: <aXM-vOUVbD8iwicr@gmail.com>
Date: Fri, 23 Jan 2026 01:29:53 -0800
From: Breno Leitao <leitao@...ian.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: corbet@....net, catalin.marinas@....com, will@...nel.org, 
	akpm@...ux-foundation.org, bp@...en8.de, pawan.kumar.gupta@...ux.intel.com, 
	mingo@...nel.org, feng.tang@...ux.alibaba.com, kees@...nel.org, elver@...gle.com, 
	arnd@...db.de, lirongqing@...du.com, fvdl@...gle.com, bhelgaas@...gle.com, 
	bhe@...hat.com, dave.hansen@...ux.intel.com, rppt@...nel.org, 
	ryan.roberts@....com, ardb@...nel.org, osandov@...com, jbohac@...e.cz, 
	sourabhjain@...ux.ibm.com, cfsworks@...il.com, linux-doc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] arm64: kexec: Add support for crashkernel CMA reservation

Hello Jinjie,

On Fri, Jan 23, 2026 at 03:48:20PM +0800, Jinjie Ruan wrote:
> Extend crashkernel CMA reservation support to arm64.

This is awesome. I was waiting for this patch! Thanks for working on it.

> @@ -75,6 +81,13 @@ static int prepare_elf_headers(void **addr, unsigned long *sz)
>  			goto out;
>  	}
>  
> +	for (i = 0; i < crashk_cma_cnt; ++i) {
> +		ret = crash_exclude_mem_range(cmem, crashk_cma_ranges[i].start,
> +					      crashk_cma_ranges[i].end);
> +		if (ret)
> +			return ret;

Don't you want to "goto out" here, given you want to free cmem.

earlirer in this function, it does:

	cmem = kmalloc(struct_size(cmem, ranges, nr_ranges), GFP_KERNEL);

you probably want to free it before returning an error, given
prepare_elf_headers() will return an error, which will fail load image,
causing the memory leak for cmem above.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ