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] [day] [month] [year] [list]
Date:   Sun, 24 May 2020 20:49:22 +0300
From:   Mike Rapoport <rppt@...ux.ibm.com>
To:     daeroro <skseofh@...il.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memblock:Do not retry a range that has already been
 checked

On Sun, May 24, 2020 at 11:16:40PM +0900, daeroro wrote:
> The range that has already been checked
> don't have to be checked in a second attempt.

The first attempts tries to find free memory in the interval [min_addr,
max_addr) and the second attempt does not care about min_addr and looks
for free memory in the interval [0, max_addr).

Is there a problem you see with this algorthim?

> Signed-off-by: daeroro <skseofh@...er.com>
> ---
>  mm/memblock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 39aceafc57f6..6f72fae415ee 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1489,7 +1489,7 @@ static void * __init memblock_alloc_internal(
>  
>  	/* retry allocation without lower limit */
>  	if (!alloc && min_addr)
> -		alloc = memblock_alloc_range_nid(size, align, 0, max_addr, nid,
> +		alloc = memblock_alloc_range_nid(size, align, 0, min_addr, nid,
>  						exact_nid);
>  
>  	if (!alloc)
> -- 
> 2.17.1
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ