[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0253d6fe-dafe-492f-b7ad-12f98ba3c507@gaisler.com>
Date: Thu, 4 Sep 2025 15:49:27 +0200
From: Andreas Larsson <andreas@...sler.com>
To: Michael Karcher <kernel@...rcher.dialup.fu-berlin.de>,
linux-kernel@...r.kernel.org
Cc: sparclinux@...r.kernel.org,
John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
Anthony Yznaga <anthony.yznaga@...cle.com>
Subject: Re: Fix accurate exception reporting in SPARC assembly
On 2025-08-26 18:03, Michael Karcher wrote:
> In 2018, David Miller implemented accurate exception reporting in
> copy_from_user and copy_to_user by handling exceptions on each load
> or store instruction that accesses userspace memory and calculating
> the remaining bytes from the processor context. As issues with
> transparent huge page support and folio support in ext4 were due
> to a bogus return value from copy_from_user, I wrote a comprehensive
> testsuite for the generic variant, and the machine-specific variants
> for UltraSPARC I/II, UltraSPARC III, Niagara, Niagara 2/3 and
> Niagara 4, see
>
> https://github.com/karcherm/sparc-cfu-bug-reproducer
>
> despite the name of the project, it does not only test copy_from_user,
> but also copy_to_user, and it also contains fixes to a very small amount
> of exception handler references that were calculating the result in
> a wrong way.
>
> For UltraSPARC III, I chose to adjust the memcpy code itself instead of
> adding complexity to multiple exception handlers. That fix has already
> been tested to fix stability issues observed by Adrian Glaubitz which
> kicked of the investigation. On all other architectures, the changes
> are just to the exception handlers.
Hi Michael,
Thank you very much for this series as well as the followup patch for M7!
This cover letter for this series gives good contextual information for
the series, but when looking at the commit message for a single patch in
isolation it is not clear at a glance what is being fixed. Do you think
you could put in a short description in each patch in this series, and
also in the followup M7 patch, on what it is doing and what it is
solving?
Cheers,
Andreas
Powered by blists - more mailing lists