Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: tegra: Use I/O memcpy to write to IRAM

Kasan crashes the kernel trying to check boundaries when using the
normal memcpy.

Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Link: https://lore.kernel.org/r/20250522-mach-tegra-kasan-v1-1-419041b8addb@gmail.com
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Aaron Kling and committed by
Thierry Reding
398e67e0 19272b37

+1 -1
+1 -1
arch/arm/mach-tegra/reset.c
··· 63 63 BUG_ON(is_enabled); 64 64 BUG_ON(tegra_cpu_reset_handler_size > TEGRA_IRAM_RESET_HANDLER_SIZE); 65 65 66 - memcpy(iram_base, (void *)__tegra_cpu_reset_handler_start, 66 + memcpy_toio(iram_base, (void *)__tegra_cpu_reset_handler_start, 67 67 tegra_cpu_reset_handler_size); 68 68 69 69 err = call_firmware_op(set_cpu_boot_addr, 0, reset_address);