linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: tegra: Use io memcpy to write to iram
@ 2025-05-22 16:11 Aaron Kling via B4 Relay
  2025-05-28 17:45 ` Aaron Kling
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Aaron Kling via B4 Relay @ 2025-05-22 16:11 UTC (permalink / raw)
  To: Russell King, Thierry Reding, Jonathan Hunter
  Cc: linux-arm-kernel, linux-tegra, linux-kernel, Aaron Kling

From: Aaron Kling <webgeek1234@gmail.com>

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

Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
Change-Id: I27714f45aa6aea6a7bee048f706b14b8c7535164
---
 arch/arm/mach-tegra/reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
index d5c805adf7a82b938bebd8941eae974cf6bcdbe3..ea706fac63587a393a17fe0f1c2ad69d6e5c14f2 100644
--- a/arch/arm/mach-tegra/reset.c
+++ b/arch/arm/mach-tegra/reset.c
@@ -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);

---
base-commit: d608703fcdd9e9538f6c7a0fcf98bf79b1375b60
change-id: 20250522-mach-tegra-kasan-fabd0253f268

Best regards,
-- 
Aaron Kling <webgeek1234@gmail.com>




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Use io memcpy to write to iram
  2025-05-22 16:11 [PATCH] ARM: tegra: Use io memcpy to write to iram Aaron Kling via B4 Relay
@ 2025-05-28 17:45 ` Aaron Kling
  2025-06-30 19:33   ` Aaron Kling
  2025-07-03 10:30 ` Thierry Reding
  2025-07-09 12:20 ` Thierry Reding
  2 siblings, 1 reply; 5+ messages in thread
From: Aaron Kling @ 2025-05-28 17:45 UTC (permalink / raw)
  To: webgeek1234
  Cc: Russell King, Thierry Reding, Jonathan Hunter, linux-arm-kernel,
	linux-tegra, linux-kernel

On Thu, May 22, 2025 at 11:11 AM Aaron Kling via B4 Relay
<devnull+webgeek1234.gmail.com@kernel.org> wrote:
>
> From: Aaron Kling <webgeek1234@gmail.com>
>
> Kasan crashes the kernel trying to check boundaries when using the
> normal memcpy.
>
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
> Change-Id: I27714f45aa6aea6a7bee048f706b14b8c7535164
> ---
>  arch/arm/mach-tegra/reset.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
> index d5c805adf7a82b938bebd8941eae974cf6bcdbe3..ea706fac63587a393a17fe0f1c2ad69d6e5c14f2 100644
> --- a/arch/arm/mach-tegra/reset.c
> +++ b/arch/arm/mach-tegra/reset.c
> @@ -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);
>
> ---
> base-commit: d608703fcdd9e9538f6c7a0fcf98bf79b1375b60
> change-id: 20250522-mach-tegra-kasan-fabd0253f268
>
> Best regards,
> --
> Aaron Kling <webgeek1234@gmail.com>
>
>

Friendly reminder about this patch.

Sincerely,
Aaron


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Use io memcpy to write to iram
  2025-05-28 17:45 ` Aaron Kling
@ 2025-06-30 19:33   ` Aaron Kling
  0 siblings, 0 replies; 5+ messages in thread
From: Aaron Kling @ 2025-06-30 19:33 UTC (permalink / raw)
  To: webgeek1234
  Cc: Russell King, Thierry Reding, Jonathan Hunter, linux-arm-kernel,
	linux-tegra, linux-kernel

On Wed, May 28, 2025 at 12:45 PM Aaron Kling <webgeek1234@gmail.com> wrote:
>
> On Thu, May 22, 2025 at 11:11 AM Aaron Kling via B4 Relay
> <devnull+webgeek1234.gmail.com@kernel.org> wrote:
> >
> > From: Aaron Kling <webgeek1234@gmail.com>
> >
> > Kasan crashes the kernel trying to check boundaries when using the
> > normal memcpy.
> >
> > Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> > ---
> > Change-Id: I27714f45aa6aea6a7bee048f706b14b8c7535164
> > ---
> >  arch/arm/mach-tegra/reset.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
> > index d5c805adf7a82b938bebd8941eae974cf6bcdbe3..ea706fac63587a393a17fe0f1c2ad69d6e5c14f2 100644
> > --- a/arch/arm/mach-tegra/reset.c
> > +++ b/arch/arm/mach-tegra/reset.c
> > @@ -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);
> >
> > ---
> > base-commit: d608703fcdd9e9538f6c7a0fcf98bf79b1375b60
> > change-id: 20250522-mach-tegra-kasan-fabd0253f268
> >
> > Best regards,
> > --
> > Aaron Kling <webgeek1234@gmail.com>
> >
> >
>
> Friendly reminder about this patch.

Re-reminder about this patch.

Aaron


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Use io memcpy to write to iram
  2025-05-22 16:11 [PATCH] ARM: tegra: Use io memcpy to write to iram Aaron Kling via B4 Relay
  2025-05-28 17:45 ` Aaron Kling
@ 2025-07-03 10:30 ` Thierry Reding
  2025-07-09 12:20 ` Thierry Reding
  2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2025-07-03 10:30 UTC (permalink / raw)
  To: webgeek1234
  Cc: Russell King, Jonathan Hunter, linux-arm-kernel, linux-tegra,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Thu, May 22, 2025 at 11:11:24AM -0500, Aaron Kling via B4 Relay wrote:
> From: Aaron Kling <webgeek1234@gmail.com>
> 
> Kasan crashes the kernel trying to check boundaries when using the
> normal memcpy.
> 
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
> Change-Id: I27714f45aa6aea6a7bee048f706b14b8c7535164
> ---
>  arch/arm/mach-tegra/reset.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks fine, I'll apply this later on.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: tegra: Use io memcpy to write to iram
  2025-05-22 16:11 [PATCH] ARM: tegra: Use io memcpy to write to iram Aaron Kling via B4 Relay
  2025-05-28 17:45 ` Aaron Kling
  2025-07-03 10:30 ` Thierry Reding
@ 2025-07-09 12:20 ` Thierry Reding
  2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2025-07-09 12:20 UTC (permalink / raw)
  To: Russell King, Thierry Reding, Jonathan Hunter, Aaron Kling
  Cc: linux-arm-kernel, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>


On Thu, 22 May 2025 11:11:24 -0500, Aaron Kling wrote:
> Kasan crashes the kernel trying to check boundaries when using the
> normal memcpy.
> 
> 

Applied, thanks!

[1/1] ARM: tegra: Use io memcpy to write to iram
      commit: 4110a4d95bf0bebd8ccaaeb93988dc9c08bd7d6a

Best regards,
-- 
Thierry Reding <treding@nvidia.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-09 15:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 16:11 [PATCH] ARM: tegra: Use io memcpy to write to iram Aaron Kling via B4 Relay
2025-05-28 17:45 ` Aaron Kling
2025-06-30 19:33   ` Aaron Kling
2025-07-03 10:30 ` Thierry Reding
2025-07-09 12:20 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).