Commit 398e67e0 authored by Aaron Kling's avatar Aaron Kling Committed by Thierry Reding
Browse files

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: default avatarAaron Kling <webgeek1234@gmail.com>
Link: https://lore.kernel.org/r/20250522-mach-tegra-kasan-v1-1-419041b8addb@gmail.com


Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 19272b37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static void __init tegra_cpu_reset_handler_enable(void)
	BUG_ON(is_enabled);
	BUG_ON(tegra_cpu_reset_handler_size > TEGRA_IRAM_RESET_HANDLER_SIZE);

	memcpy(iram_base, (void *)__tegra_cpu_reset_handler_start,
	memcpy_toio(iram_base, (void *)__tegra_cpu_reset_handler_start,
			tegra_cpu_reset_handler_size);

	err = call_firmware_op(set_cpu_boot_addr, 0, reset_address);