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:   Tue, 8 Aug 2023 15:12:40 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Florian Fainelli <f.fainelli@...il.com>,
        Arnd Bergmann <arnd@...db.de>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MIPS: Drop virt_to_phys define to self

On Tue, Aug 8, 2023 at 11:29 AM Linus Walleij <linus.walleij@...aro.org> wrote:

> The function virt_to_phys was defined to virt_to_phys and then
> implemented right below.
>
> I can't understand why, just drop it and let the actual function
> slot in.
>
> Fixes: dfad83cb7193 ("MIPS: Add support for CONFIG_DEBUG_VIRTUAL")
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>  arch/mips/include/asm/io.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
> index affd21e9c20b..18ed44843541 100644
> --- a/arch/mips/include/asm/io.h
> +++ b/arch/mips/include/asm/io.h
> @@ -111,7 +111,6 @@ extern phys_addr_t __virt_to_phys(volatile const void *x);
>  #define __virt_to_phys(x)      __virt_to_phys_nodebug(x)
>  #endif
>
> -#define virt_to_phys virt_to_phys
>  static inline phys_addr_t virt_to_phys(const volatile void *x)
>  {
>         return __virt_to_phys(x);

Just have to CC Arnd on this because I never feel I understand this
properly.

Normally you would do this so as to override the default virt_to_phys()
from include/asm-generic/io.h, but we do not seem to be using it here?

Further right below we are implementing phys_to_virt() with no
corresponding define, so in any case this needs to go or that one
needs a define.

That said they seem like a good candidate to replace with the
generic variant because the content is the same sans some debug
hacks that I doubt are still needed.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ