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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220708123454.mj7f3gdzk3ct6seb@mobilestation>
Date:   Fri, 8 Jul 2022 15:34:54 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     linux-mips@...r.kernel.org,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] MIPS: Make phys_to_virt utilize __va()

On Thu, Jul 07, 2022 at 01:37:42PM -0700, Florian Fainelli wrote:
> The implementation is exactly the same, so avoid open-coding it in two
> different locations.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>

Seems reasonable. Thanks.

Reviewed-by: Serge Semin <fancer.lancer@...il.com>

*Note it now looks exactly as the generic phys_to_virt().

-Sergey

> ---
>  arch/mips/include/asm/io.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
> index 6f5c86d2bab4..880048a54362 100644
> --- a/arch/mips/include/asm/io.h
> +++ b/arch/mips/include/asm/io.h
> @@ -131,7 +131,7 @@ static inline phys_addr_t virt_to_phys(const volatile void *x)
>   */
>  static inline void * phys_to_virt(unsigned long address)
>  {
> -	return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
> +	return __va(address);
>  }
>  
>  /*
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ