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: <83540cb1-0c9b-f572-849a-cb100437d049@ghiti.fr>
Date:   Wed, 26 Apr 2023 11:31:35 +0200
From:   Alexandre Ghiti <alex@...ti.fr>
To:     Song Shuai <suagrfillet@...il.com>, paul.walmsley@...ive.com,
        palmer@...belt.com, aou@...s.berkeley.edu, alexghiti@...osinc.com,
        heiko@...ech.de, conor.dooley@...rochip.com, guoren@...nel.org,
        anshuman.khandual@....com, mick@....forth.gr, samuel@...lland.org
Cc:     linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -fixes] riscv: mm: remove redundant parameter of
 create_fdt_early_page_table

Hi Song,


On 4/26/23 11:15, Song Shuai wrote:
> create_fdt_early_page_table() explicitly uses early_pg_dir for
> 32-bit ftb mapping and the pgdir parameter is redundant here.


s/ftb/fdt


> So remove it and its caller.
>
> Signed-off-by: Song Shuai <suagrfillet@...il.com>
> ---
>   arch/riscv/mm/init.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index 0f14f4a8d179..6ebb75a9a6b9 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -843,8 +843,7 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early)
>    * this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR
>    * entry.
>    */
> -static void __init create_fdt_early_page_table(pgd_t *pgdir,
> -					       uintptr_t fix_fdt_va,
> +static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va,
>   					       uintptr_t dtb_pa)
>   {
>   	uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
> @@ -1034,8 +1033,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
>   	create_kernel_page_table(early_pg_dir, true);
>   
>   	/* Setup early mapping for FDT early scan */
> -	create_fdt_early_page_table(early_pg_dir,
> -				    __fix_to_virt(FIX_FDT), dtb_pa);
> +	create_fdt_early_page_table(__fix_to_virt(FIX_FDT), dtb_pa);
>   
>   	/*
>   	 * Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap


You're right, it was never used, weird the compiler never complained. 
And the function name clearly indicates it is for early_pg_dir so no 
need for this parameter. You can add:

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

Thanks!

Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ