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: <f47e66f9-ec20-4e75-b88f-d412339e797d@app.fastmail.com>
Date: Thu, 26 Sep 2024 07:14:16 +0000
From: "Arnd Bergmann" <arnd@...db.de>
To: "Julian Vetter" <jvetter@...rayinc.com>,
 "Catalin Marinas" <catalin.marinas@....com>, "Will Deacon" <will@...nel.org>,
 guoren <guoren@...nel.org>, "Huacai Chen" <chenhuacai@...nel.org>,
 "WANG Xuerui" <kernel@...0n.name>,
 "Andrew Morton" <akpm@...ux-foundation.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
 loongarch@...ts.linux.dev, "Yann Sionneau" <ysionneau@...rayinc.com>
Subject: Re: [PATCH v6 1/5] Consolidate __memcpy_{to,from}io and __memset_io into
 iomap_copy.c

On Wed, Sep 25, 2024, at 13:24, Julian Vetter wrote:
> Various architectures have almost the same implementations for
> __memcpy_{to,from}io and __memset_io functions. So, consolidate them
> into the existing lib/iomap_copy.c.
>
> Reviewed-by: Yann Sionneau <ysionneau@...rayinc.com>
> Signed-off-by: Julian Vetter <jvetter@...rayinc.com>
> ---
> Signed-off-by: Julian Vetter <jvetter@...rayinc.com>

You have a duplicated signoff here.


> +#ifndef __memcpy_fromio
> +void __memcpy_fromio(void *to, const volatile void __iomem *from, 
> size_t count);
> +#endif
> +
> +#ifndef __memcpy_toio
> +void __memcpy_toio(volatile void __iomem *to, const void *from, size_t 
> count);
> +#endif
> +
> +#ifndef __memset_io
> +void __memset_io(volatile void __iomem *dst, int c, size_t count);
> +#endif

I'm not entirely sure about the purpose of the #ifdef here, since
nothing ever overrides the double-underscore versions, both before
and after your patches.

Unless I'm missing something here, I think a more logical
sequence would be:

1. add the definitions in this file without the underscores,
   as memcpy_fromio/memcpy_toio/memset_io, with the #ifdef
   for that name that is always set at this point

2. replace the default implementation in asm-generic/io.h
   with extern prototypes, remove the #define from those

3. convert the other architectures, removing both the
   implementations and the prototypes.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ