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>] [day] [month] [year] [list]
Message-ID: <20240703223325.6832892b5f70.Ib536e07baa98b5bf760424eaf984d79284343f05@changeid>
Date: Wed,  3 Jul 2024 22:33:26 +0200
From: Johannes Berg <johannes@...solutions.net>
To: linux-arch@...r.kernel.org
Cc: Arnd Bergmann <arnd@...db.de>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] asm-generic/iomap.h: don't check for readq/writeq

At least on ARCH=um, the generic implementations of
readq/writeq from asm-generic/io.h are used, but it
may also use GENERIC_IOMAP. In this case, io.h will
include iomap.h before readq/writeq are defined and
as a result, iomap.h never declares iowrite64_lo_hi
and friends, causing compiler/warnings errors when
they're then implemented in iomap.c, also making it
impossible to actually use them.

Fix this by simply defining all the 64-bit versions
always and always only on 64-bit platforms, without
regard to readq/writeq.

Normally, 64-bit platforms will have them anyway,
and if they neither have it nor use asm-generic/io.h
then iomap.c will simply not have the functions (the
ifdef remains there) and the link will fail (rather
than compilation).

Signed-off-by: Johannes Berg <johannes@...solutions.net>
---
 include/asm-generic/iomap.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
index 196087a8126e..e3c0d4a85800 100644
--- a/include/asm-generic/iomap.h
+++ b/include/asm-generic/iomap.h
@@ -34,9 +34,6 @@ extern unsigned int ioread32be(const void __iomem *);
 #ifdef CONFIG_64BIT
 extern u64 ioread64(const void __iomem *);
 extern u64 ioread64be(const void __iomem *);
-#endif
-
-#ifdef readq
 #define ioread64_lo_hi ioread64_lo_hi
 #define ioread64_hi_lo ioread64_hi_lo
 #define ioread64be_lo_hi ioread64be_lo_hi
@@ -55,9 +52,6 @@ extern void iowrite32be(u32, void __iomem *);
 #ifdef CONFIG_64BIT
 extern void iowrite64(u64, void __iomem *);
 extern void iowrite64be(u64, void __iomem *);
-#endif
-
-#ifdef writeq
 #define iowrite64_lo_hi iowrite64_lo_hi
 #define iowrite64_hi_lo iowrite64_hi_lo
 #define iowrite64be_lo_hi iowrite64be_lo_hi
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ