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: <112ac071-71cc-466e-ab13-f624edb77bb9@ghiti.fr>
Date: Tue, 19 Mar 2024 13:36:13 +0100
From: Alexandre Ghiti <alex@...ti.fr>
To: Dawei Li <dawei.li@...ngroup.cn>, paul.walmsley@...ive.com,
 palmer@...belt.com, aou@...s.berkeley.edu
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
 set_pte_at@...look.com
Subject: Re: [PATCH] riscv: Remove redundant CONFIG_64BIT from
 pgtable_l{4,5}_enabled

Hi Dawei,

On 12/03/2024 09:50, Dawei Li wrote:
> IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is
> redundant, remove it.
>
> While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init.


I guess this comment ^ implies that you need to split this patch into 2 :)

Feel free to add on both:

Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>

Thanks,

Alex


>
> Signed-off-by: Dawei Li <dawei.li@...ngroup.cn>
> ---
>   arch/riscv/mm/init.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index fa34cf55037b..204cdf5b829d 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32;
>   EXPORT_SYMBOL(satp_mode);
>   
>   #ifdef CONFIG_64BIT
> -bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> -bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> +bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
> +bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
>   EXPORT_SYMBOL(pgtable_l4_enabled);
>   EXPORT_SYMBOL(pgtable_l5_enabled);
>   #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ