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]
Date: Mon, 24 Jun 2024 11:31:48 +0200
From: Alexandre Ghiti <alexghiti@...osinc.com>
To: Björn Töpel <bjorn@...nel.org>
Cc: Albert Ou <aou@...s.berkeley.edu>, David Hildenbrand <david@...hat.com>, 
	Palmer Dabbelt <palmer@...belt.com>, Paul Walmsley <paul.walmsley@...ive.com>, 
	linux-riscv@...ts.infradead.org, Oscar Salvador <osalvador@...e.de>, 
	Björn Töpel <bjorn@...osinc.com>, 
	Andrew Bresticker <abrestic@...osinc.com>, 
	Chethan Seshadri <Chethan.Seshadri@...alinasystems.io>, Lorenzo Stoakes <lstoakes@...il.com>, 
	Santosh Mamila <santosh.mamila@...alinasystems.io>, 
	Sivakumar Munnangi <siva.munnangi@...alinasystems.io>, Sunil V L <sunilvl@...tanamicro.com>, 
	linux-kernel@...r.kernel.org, linux-mm@...ck.org, 
	virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH v4 05/11] riscv: mm: Add pfn_to_kaddr() implementation

(resending as gmail client turned to html)


On Wed, Jun 5, 2024 at 1:41 PM Björn Töpel <bjorn@...nel.org> wrote:
>
> From: Björn Töpel <bjorn@...osinc.com>
>
> The pfn_to_kaddr() function is used by KASAN's memory hotplugging
> path. Add the missing function to the RISC-V port, so that it can be
> built with MHP and CONFIG_KASAN.
>
> Signed-off-by: Björn Töpel <bjorn@...osinc.com>
> ---
>  arch/riscv/include/asm/page.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
> index 115ac98b8d72..235fd45d998d 100644
> --- a/arch/riscv/include/asm/page.h
> +++ b/arch/riscv/include/asm/page.h
> @@ -188,6 +188,11 @@ extern phys_addr_t __phys_addr_symbol(unsigned long x);
>
>  unsigned long kaslr_offset(void);
>
> +static __always_inline void *pfn_to_kaddr(unsigned long pfn)
> +{
> +       return __va(pfn << PAGE_SHIFT);
> +}
> +
>  #endif /* __ASSEMBLY__ */
>
>  #define virt_addr_valid(vaddr) ({                                              \
> --
> 2.43.0
>

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

Thanks,

Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ