sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fix accurate exception reporting in SPARC assembly
@ 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
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Michael Karcher @ 2025-08-26 16:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: sparclinux, Michael Karcher, Andreas Larsson,
	John Paul Adrian Glaubitz, Anthony Yznaga

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.

Kind regards,
  Michael Karcher

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

end of thread, other threads:[~2025-09-02 21:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26 16:03 Fix accurate exception reporting in SPARC assembly 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-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-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-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

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).