diff options
| author | Karl Mehltretter <kmehltretter@gmail.com> | 2026-05-24 06:52:36 +0100 |
|---|---|---|
| committer | Russell King <rmk+kernel@armlinux.org.uk> | 2026-06-11 14:52:00 +0100 |
| commit | d59ed803715a71fb9582e139d648ece8d66dc743 (patch) | |
| tree | 2459a5d66d333bcbe24441af8ca49f7c28f87784 /arch/nds32/kernel/git@git.tavy.me:linux.git | |
| parent | 254f49634ee16a731174d2ae34bc50bd5f45e731 (diff) | |
ARM: 9474/1: io: avoid KASAN instrumentation of raw halfword I/O
For CPUs before ARMv6, __raw_readw() and __raw_writew() are implemented
as C volatile halfword accesses so the compiler can generate an access
sequence that is safe for those machines. With KASAN enabled, those C
accesses are instrumented as normal memory accesses.
That is not valid for MMIO. On ARM926/VersatilePB with KASAN enabled,
PL011 probing traps in __asan_store2() while registering the UART, because
the instrumented writew() tries to check KASAN shadow for an MMIO address.
Keep the existing volatile halfword access, but move the ARMv5 definitions
into __no_kasan_or_inline functions so raw MMIO halfword accesses are not
instrumented by KASAN. The ARMv6-and-newer inline assembly path is
unchanged.
Fixes: 421015713b30 ("ARM: 9017/2: Enable KASan for ARM")
Cc: stable@vger.kernel.org # v5.11+
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/nds32/kernel/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
