From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Andreas Larsson <andreas@gaisler.com>,
Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>,
linux-kernel@vger.kernel.org
Cc: sparclinux@vger.kernel.org, Anthony Yznaga <anthony.yznaga@oracle.com>
Subject: Re: Fix accurate exception reporting in SPARC assembly
Date: Thu, 04 Sep 2025 19:21:54 +0200 [thread overview]
Message-ID: <2e8a8a058e7451174ddbf3ec2a0a1d7728c45210.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <0253d6fe-dafe-492f-b7ad-12f98ba3c507@gaisler.com>
Hi Andreas,
On Thu, 2025-09-04 at 15:49 +0200, Andreas Larsson wrote:
> 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?
FWIW, Michael is just waiting for a pending test on a SPARC T1 CPU which
would test patch 3/4 which fixes the Niagara-specific implementation.
Results should be posted today or tomorrow.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
prev parent reply other threads:[~2025-09-04 17:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 16:03 Michael Karcher
2025-08-26 16:03 ` [PATCH 1/4] sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC Michael Karcher
2025-08-29 10:53 ` John Paul Adrian Glaubitz
2025-09-02 16:33 ` Rene Rebe
2025-09-03 22:05 ` Jonathan Pallant
2025-08-26 16:03 ` [PATCH 2/4] sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III Michael Karcher
2025-08-27 6:34 ` John Paul Adrian Glaubitz
2025-08-28 15:53 ` John Paul Adrian Glaubitz
2025-08-30 1:57 ` Anthony Yznaga
2025-08-30 8:35 ` Michael Karcher
2025-09-04 14:05 ` Andreas Larsson
2025-09-04 14:14 ` Michael Karcher
2025-09-02 16:38 ` Rene Rebe
2025-08-26 16:03 ` [PATCH 3/4] sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara Michael Karcher
2025-08-29 21:44 ` John Paul Adrian Glaubitz
2025-09-02 16:40 ` Rene Rebe
2025-09-02 16:47 ` John Paul Adrian Glaubitz
2025-09-02 16:51 ` Rene Rebe
2025-09-02 16:53 ` John Paul Adrian Glaubitz
2025-09-02 17:04 ` Rene Rebe
2025-09-02 17:11 ` John Paul Adrian Glaubitz
2025-09-02 21:51 ` René Rebe
2025-09-05 8:04 ` Andreas Larsson
2025-09-05 9:02 ` John Paul Adrian Glaubitz
2025-09-04 18:36 ` Magnus Lindholm
2025-09-05 3:36 ` Ken Link
[not found] ` <CAPZdOsbQYRV=6D1Y62BZw2QH24tx0-+26n0yyG_YutvrocygiQ@mail.gmail.com>
2025-09-05 6:36 ` John Paul Adrian Glaubitz
2025-09-08 4:32 ` Ethan Hawke
2025-08-26 16:03 ` [PATCH 4/4] sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara 4 Michael Karcher
2025-08-27 6:37 ` John Paul Adrian Glaubitz
2025-08-28 20:21 ` John Paul Adrian Glaubitz
2025-08-29 13:24 ` Michael Karcher
2025-09-04 13:49 ` Fix accurate exception reporting in SPARC assembly Andreas Larsson
2025-09-04 17:21 ` John Paul Adrian Glaubitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e8a8a058e7451174ddbf3ec2a0a1d7728c45210.camel@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=andreas@gaisler.com \
--cc=anthony.yznaga@oracle.com \
--cc=kernel@mkarcher.dialup.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®