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: <49fe95c8-031e-5f4b-3c37-8bc78a7210d8@ghiti.fr>
Date:   Tue, 10 Jan 2023 10:21:32 +0000
From:   Alexandre Ghiti <alex@...ti.fr>
To:     guoren@...nel.org, alexandre.ghiti@...onical.com,
        palmer@...belt.com
Cc:     linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH] riscv: pgtable: Fixup comment for KERN_VIRT_SIZE

Hi Guo,

On 1/10/23 09:04, guoren@...nel.org wrote:
> From: Guo Ren <guoren@...ux.alibaba.com>
>
> KERN_VIRT_SIZE is 1/4 of the entries of the page global directory,
> not half.
>
> Fixes: f7ae02333d13 ("riscv: Move KASAN mapping next to the kernel mapping")
> Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@...nel.org>
> Cc: Alexandre Ghiti <alexandre.ghiti@...onical.com>
> ---
>   arch/riscv/include/asm/pgtable.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 4eba9a98d0e3..2a88362dffa5 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h
> @@ -31,7 +31,7 @@
>   #define PTRS_PER_PTE    (PAGE_SIZE / sizeof(pte_t))
>   
>   /*
> - * Half of the kernel address space (half of the entries of the page global
> + * Half of the kernel address space (1/4 of the entries of the page global


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

Thanks,

Alex


>    * directory) is for the direct mapping.
>    */
>   #define KERN_VIRT_SIZE          ((PTRS_PER_PGD / 2 * PGDIR_SIZE) / 2)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ