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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 26 Apr 2021 14:29:09 +0300
From:   Mike Rapoport <rppt@...ux.ibm.com>
To:     Vladimir Isaev <Vladimir.Isaev@...opsys.com>
Cc:     linux-snps-arc@...ts.infradead.org, linux-arch@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARC: Use max_high_pfn as a HIGHMEM zone border

Hi,

On Mon, Apr 26, 2021 at 01:10:04PM +0300, Vladimir Isaev wrote:
> Commit 4af22ded0ecf ("arc: fix memory initialization for systems with two
> memory banks") fixed highmem, but not for PAE case when highmem is
> actually bigger than lowmem.
> 
> Signed-off-by: Vladimir Isaev <isaev@...opsys.com>
> Cc: Mike Rapoport <rppt@...ux.ibm.com>
> ---
>  arch/arc/mm/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
> index ce07e697916c..59bad6f94105 100644
> --- a/arch/arc/mm/init.c
> +++ b/arch/arc/mm/init.c
> @@ -157,7 +157,7 @@ void __init setup_arch_memory(void)
>  	min_high_pfn = PFN_DOWN(high_mem_start);
>  	max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz);
>  
> -	max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn;
> +	max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;

This is correct with PAE40, but it will break !PAE40 when "highmem" has
lower addresses than lowmem.

It rather should be something like:

        if (IS_ENABLED(CONFIG_ARC_HAS_PAE40))
                max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
        else
            	max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn;


>  
>  	high_memory = (void *)(min_high_pfn << PAGE_SHIFT);
>  
> -- 
> 2.16.2
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ