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]
Message-ID: <20210204171927.GK299309@linux.ibm.com>
Date:   Thu, 4 Feb 2021 19:19:27 +0200
From:   Mike Rapoport <rppt@...ux.ibm.com>
To:     Andreas Larsson <andreas@...sler.com>
Cc:     David Miller <davem@...emloft.net>, sparclinux@...r.kernel.org,
        Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org,
        software@...sler.com
Subject: Re: [PATCH] sparc32: Limit memblock allocation to low memory

On Thu, Feb 04, 2021 at 05:20:53PM +0100, Andreas Larsson wrote:
> Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use
> memblocks instead of bootmem, but also made high memory available via
> memblock allocation which does work together with e.g. phys_to_virt and
> leads to crashes.
> 
> This changes back to only low memory being allocatable in the early
> stages, now using memblock allocation.
> 
> Signed-off-by: Andreas Larsson <andreas@...sler.com>

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

> ---
>  arch/sparc/mm/init_32.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
> index eb2946b1df8a..6139c5700ccc 100644
> --- a/arch/sparc/mm/init_32.c
> +++ b/arch/sparc/mm/init_32.c
> @@ -197,6 +197,9 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
>  	size = memblock_phys_mem_size() - memblock_reserved_size();
>  	*pages_avail = (size >> PAGE_SHIFT) - high_pages;
>  
> +	/* Only allow low memory to be allocated via memblock allocation */
> +	memblock_set_current_limit(max_low_pfn << PAGE_SHIFT);
> +
>  	return max_pfn;
>  }
>  
> -- 
> 2.17.1
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ