lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250826160312.2070-1-kernel@mkarcher.dialup.fu-berlin.de>
Date: Tue, 26 Aug 2025 18:03:02 +0200
From: Michael Karcher <kernel@...rcher.dialup.fu-berlin.de>
To: linux-kernel@...r.kernel.org
Cc: sparclinux@...r.kernel.org,
	Michael Karcher <kernel@...rcher.dialup.fu-berlin.de>,
	Andreas Larsson <andreas@...sler.com>,
	John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
	Anthony Yznaga <anthony.yznaga@...cle.com>
Subject: Fix accurate exception reporting in SPARC assembly

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ