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: <459d0f64-fea9-a060-91a5-17a37834fb1b@arm.com>
Date:   Thu, 10 Sep 2020 11:47:14 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Gavin Shan <gshan@...hat.com>, linux-arm-kernel@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org, catalin.marinas@....com,
        will@...nel.org, shan.gavin@...il.com
Subject: Re: [PATCH 2/2] arm64/mm: Use CONT_SHIFT to define CONT_PTE_SHIFT



On 09/08/2020 12:49 PM, Gavin Shan wrote:
> The macro CONT_PTE_SHIFT actually depends on CONT_SHIFT, which has
> been defined in page-def.h, based on CONFIG_ARM64_CONT_SHIFT. Lets
> reflect the dependency.
> 
> Signed-off-by: Gavin Shan <gshan@...hat.com>
> ---
>  arch/arm64/include/asm/pgtable-hwdef.h | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
> index 8a399e666837..0bd9469f4323 100644
> --- a/arch/arm64/include/asm/pgtable-hwdef.h
> +++ b/arch/arm64/include/asm/pgtable-hwdef.h
> @@ -81,14 +81,12 @@
>  /*
>   * Contiguous page definitions.
>   */
> +#define CONT_PTE_SHIFT		(CONT_SHIFT + PAGE_SHIFT)
>  #ifdef CONFIG_ARM64_64K_PAGES
> -#define CONT_PTE_SHIFT		(5 + PAGE_SHIFT)
>  #define CONT_PMD_SHIFT		(5 + PMD_SHIFT)
>  #elif defined(CONFIG_ARM64_16K_PAGES)
> -#define CONT_PTE_SHIFT		(7 + PAGE_SHIFT)
>  #define CONT_PMD_SHIFT		(5 + PMD_SHIFT)
>  #else
> -#define CONT_PTE_SHIFT		(4 + PAGE_SHIFT)
>  #define CONT_PMD_SHIFT		(4 + PMD_SHIFT)
>  #endif
Could not a similar CONT_PMD be created from a new CONFIG_ARM64_CONT_PMD
config option, which would help unify CONT_PMD_SHIFT here as well ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ