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]
Date: Wed, 22 May 2024 09:31:29 -0500
From: Rob Herring <robh@...nel.org>
To: skseofh@...il.com
Cc: lkp@...el.com, daero_le.lee@...sung.com, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
	oe-kbuild-all@...ts.linux.dev, rppt@...nel.org,
	saravanak@...gle.com
Subject: Re: [PATCH v2] of: of_reserved_mem: clean-up reserved memory with
 no-map

On Wed, May 01, 2024 at 10:23:59PM +0900, skseofh@...il.com wrote:
> From: Daero Lee <daero_le.lee@...sung.com>
> 
> In early_init_dt_reserve_memory we only add memory w/o no-map flag to
> memblock.reserved. But we need to add memory w/ no-map flag to
> memblock.reserved, because NOMAP and memblock.reserved are semantically
> different.
> 
> Signed-off-by: Daero Lee <daero_le.lee@...sung.com>
> ---
>  drivers/of/of_reserved_mem.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> index 8236ecae2953..d00a17a9cebc 100644
> --- a/drivers/of/of_reserved_mem.c
> +++ b/drivers/of/of_reserved_mem.c
> @@ -81,6 +81,7 @@ static void __init fdt_reserved_mem_save_node(unsigned long node, const char *un
>  static int __init early_init_dt_reserve_memory(phys_addr_t base,
>  					       phys_addr_t size, bool nomap)
>  {
> +	int err = 0;
>  	if (nomap) {
>  		/*
>  		 * If the memory is already reserved (by another region), we
> @@ -91,7 +92,10 @@ static int __init early_init_dt_reserve_memory(phys_addr_t base,
>  		    memblock_is_region_reserved(base, size))
>  			return -EBUSY;
>  
> -		return memblock_mark_nomap(base, size);
> +
> +		err = memblock_mark_nomap(base, size);

The last time this was touched, it was to make the handling aligned with 
EFI memory map handling. Is that still going to be the case with this 
change? Or does EFI memory map handling have the same issue?

> +		if (err)
> +			return err;
>  	}
>  	return memblock_reserve(base, size);
>  }
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ