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: <20190319204253.GB17966@rapoport-lnx>
Date:   Tue, 19 Mar 2019 22:42:54 +0200
From:   Mike Rapoport <rppt@...ux.ibm.com>
To:     Logan Gunthorpe <logang@...tatee.com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Rob Herring <robh@...nel.org>,
        Russell King <linux@...linux.org.uk>,
        Kees Cook <keescook@...omium.org>,
        Philip Derrin <philip@....systems>,
        "Steven Rostedt (VMware)" <rostedt@...dmis.org>,
        Nicolas Pitre <nicolas.pitre@...aro.org>
Subject: Re: [PATCH] ARM: mm: make use of new memblocks_present() helper

On Tue, Mar 19, 2019 at 12:13:57PM -0600, Logan Gunthorpe wrote:
> Cleanup the arm_memory_present() function seeing it's very
> similar to other arches.
> 
> The new memblocks_present() helper checks for node ids which the
> arm version did not. However, this is equivalent seeing
> HAVE_MEMBLOCK_NODE_MAP should be false in this arch and therefore
> memblock_get_region_node() should return 0.
> 
> Signed-off-by: Logan Gunthorpe <logang@...tatee.com>
> Cc: Russell King <linux@...linux.org.uk>
> Cc: Kees Cook <keescook@...omium.org>
> Cc: Philip Derrin <philip@....systems>
> Cc: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
> Cc: Nicolas Pitre <nicolas.pitre@...aro.org>

Reviewed-by: Mike Rapoport <rppt@...ux.ibm.com>

Strangely, I've got a feeling I've already reviewed such patch from a
different person...

> ---
>  arch/arm/mm/init.c | 17 +----------------
>  1 file changed, 1 insertion(+), 16 deletions(-)
> 
> This is just a resend.
> 
> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
> index 478ea8b7db87..6c50dd407ba8 100644
> --- a/arch/arm/mm/init.c
> +++ b/arch/arm/mm/init.c
> @@ -182,21 +182,6 @@ int pfn_valid(unsigned long pfn)
>  EXPORT_SYMBOL(pfn_valid);
>  #endif
> 
> -#ifndef CONFIG_SPARSEMEM
> -static void __init arm_memory_present(void)
> -{
> -}
> -#else
> -static void __init arm_memory_present(void)
> -{
> -	struct memblock_region *reg;
> -
> -	for_each_memblock(memory, reg)
> -		memory_present(0, memblock_region_memory_base_pfn(reg),
> -			       memblock_region_memory_end_pfn(reg));
> -}
> -#endif
> -
>  static bool arm_memblock_steal_permitted = true;
> 
>  phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
> @@ -292,7 +277,7 @@ void __init bootmem_init(void)
>  	 * Sparsemem tries to allocate bootmem in memory_present(),
>  	 * so must be done after the fixed reservations
>  	 */
> -	arm_memory_present();
> +	memblocks_present();
> 
>  	/*
>  	 * sparse_init() needs the bootmem allocator up and running.
> --
> 2.20.1
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ