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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 14 Nov 2019 09:11:28 +0100
From:   Mike Rapoport <rppt@...ux.ibm.com>
To:     Max Filippov <jcmvbkbc@...il.com>
Cc:     linux-xtensa@...ux-xtensa.org, Chris Zankel <chris@...kel.net>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map

On Wed, Nov 13, 2019 at 05:08:24PM -0800, Max Filippov wrote:
> KASAN shadow map doesn't need to be accessible through the linear kernel
> mapping, allocate its pages with MEMBLOCK_ALLOC_ANYWHERE so that high
> memory can be used. This frees up to ~100MB of low memory on xtensa
> configurations with KASAN and high memory.
> 
> Cc: stable@...r.kernel.org # v5.1+
> Fixes: f240ec09bb8a ("memblock: replace memblock_alloc_base(ANYWHERE)
> 		     with memblock_phys_alloc")
> Signed-off-by: Max Filippov <jcmvbkbc@...il.com>

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

> ---
>  arch/xtensa/mm/kasan_init.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/xtensa/mm/kasan_init.c b/arch/xtensa/mm/kasan_init.c
> index 9c957791bb33..e3baa21ff24c 100644
> --- a/arch/xtensa/mm/kasan_init.c
> +++ b/arch/xtensa/mm/kasan_init.c
> @@ -60,7 +60,9 @@ static void __init populate(void *start, void *end)
>  
>  		for (k = 0; k < PTRS_PER_PTE; ++k, ++j) {
>  			phys_addr_t phys =
> -				memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE);
> +				memblock_phys_alloc_range(PAGE_SIZE, PAGE_SIZE,
> +							  0,
> +							  MEMBLOCK_ALLOC_ANYWHERE);
>  
>  			if (!phys)
>  				panic("Failed to allocate page table page\n");
> -- 
> 2.20.1
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ