]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ARM: tegra: Use I/O memcpy to write to IRAM
authorAaron Kling <webgeek1234@gmail.com>
Thu, 22 May 2025 16:11:24 +0000 (11:11 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:21:25 +0000 (16:21 +0200)
[ Upstream commit 398e67e0f5ae04b29bcc9cbf342e339fe9d3f6f1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-tegra/reset.c

index 76a65df42d10f2968de89c8e935215ab1da11977..dce0cb1fdd6f013752ee1f87b259137a1237dc58 100644 (file)
@@ -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);