[PATCH 4/7] arm/word-at-a-time: Instrument load_unaligned_zeropad()

From: Bill Wendling

Date: Fri Sep 11 2026 - 03:14:46 EST


Convert arm to the arch_load_unaligned_zeropad() /
load_unaligned_zeropad() split introduced for x86 earlier in this
series, so KASAN/KCSAN also see reads through load_unaligned_zeropad()
on this architecture.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Bill Wendling <morbo@xxxxxxxxxx>
---
Cc: Russell King <linux@xxxxxxxxxxxxxxx>
Cc: "Russell King (Oracle)" <rmk+kernel@xxxxxxxxxxxxxxx>
Cc: Liyuan Pang <pangliyuan1@xxxxxxxxxx>
Cc: Xie Yuanbin <xieyuanbin1@xxxxxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
arch/arm/include/asm/word-at-a-time.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/word-at-a-time.h b/arch/arm/include/asm/word-at-a-time.h
index 5023f98d8293..ef0002d16dc1 100644
--- a/arch/arm/include/asm/word-at-a-time.h
+++ b/arch/arm/include/asm/word-at-a-time.h
@@ -65,7 +65,7 @@ static inline unsigned long find_zero(unsigned long mask)
* and the next page not being mapped, take the exception and
* return zeroes in the non-existing part.
*/
-static inline unsigned long load_unaligned_zeropad(const void *addr)
+static inline unsigned long arch_load_unaligned_zeropad(const void *addr)
{
unsigned long ret, tmp;

@@ -96,5 +96,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
return ret;
}

+#include <asm-generic/word-at-a-time-instrumented.h>
+
#endif /* DCACHE_WORD_ACCESS */
#endif /* __ASM_ARM_WORD_AT_A_TIME_H */
--
2.47.3