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: <1db6ef22-453e-4d31-a643-8e6f84a025e4@app.fastmail.com>
Date: Mon, 27 Jan 2025 11:27:02 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Julian Vetter" <julian@...er-limits.org>,
 "Andrew Morton" <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Add io_sync stubs to generic IO memcpy/memset

On Mon, Jan 27, 2025, at 11:04, Julian Vetter wrote:
> The recently added IO memcpy and memset functions lack support for
> barriers or other sync functions before and/or after the transaction. To
> convert more architectures to use the generic IO memcpy and memset
> functions, add empty __pre_io_sync and __post_io_sync defines that can
> be overwritten by individual architectures if needed.
>
> Signed-off-by: Julian Vetter <julian@...er-limits.org>
> ---
>  lib/iomem_copy.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/lib/iomem_copy.c b/lib/iomem_copy.c
> index dec7eaea60e0..2e81182dd4d3 100644
> --- a/lib/iomem_copy.c
> +++ b/lib/iomem_copy.c
> @@ -9,6 +9,14 @@
>  #include <linux/types.h>
>  #include <linux/unaligned.h>
> 
> +#ifndef __pre_io_sync
> +#define __pre_io_sync
> +#endif
> +
> +#ifndef __post_io_sync
> +#define __post_io_sync
> +#endif

I think we should define what these barriers are supposed to
do exactly, and how they relate to the __io_br/__io_ar/__io_bw/__io_aw
ones include/asm-generic/io.h.

Depending on what the barriers are meant to do, we probably
want to either use the existing ones directly or use a similar
naming scheme.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ