From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: sparclinux <sparclinux@vger.kernel.org>
Cc: "<debian-sparc@lists.debian.org>" <debian-sparc@lists.debian.org>,
gentoo-sparc@lists.gentoo.org,
Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>,
Anthony Yznaga <anthony.yznaga@oracle.com>
Subject: Re: Current state of the Linux kernel on SPARC
Date: Tue, 26 Aug 2025 18:08:24 +0200 [thread overview]
Message-ID: <2da68167156f93a5c48e4404656036d233084501.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <a35d92d3f229811123156086766a8cd981166005.camel@physik.fu-berlin.de>
Hello,
On Sun, 2025-08-24 at 23:09 +0200, John Paul Adrian Glaubitz wrote:
> First, let's start with the bugs. For a while it has been known that recent kernel
> versions can be very unstable on certain SPARC machines, this has been observed in
> particular with UltraSPARC III CPUs but also on certain newer CPUs such as SPARC T1.
>
> After I started bisecting the issue, I ran into multiple false positives until I
> identified d53d2f78cead as the culprit which makes use of a new vmalloc flag called
> VM_FLUSH_RESET_PERMS.
>
> However, this particular change is actually not broken but rather just uncovered the
> original bug. The introduction of VM_FLUSH_RESET_PERMS allowed the kernel to flush
> TLBs earlier after booting and more often. And since the original problem was suspected
> with the TLB flush management on SPARC, it was just natural that the change in d53d2f78cead
> turned out in the bisect.
>
> Further investigation showed that the actual culprit are the CPU-specific implementations
> of copy_{from,to}_user which can be found in arch/sparc/lib. These are broken on different
> CPU types to a different degree which explains perfectly fine why recent kernels are more
> unstable on certain CPU types than on others.
>
> Luckily, Michael Karcher has already made good progress in investigating and fixing these
> bugs so that, for example, a trial patch for the UltraSPARC III showed that a simple
> one-line change would fix all the stability issues currently seen on these CPU types.
>
> It is expected that a series of patches will follow shortly that will address the bugs in
> the copy_{from,to}_user on all affected CPU types. In the mean time, it should be possible
> to switch the kernel to the generic code for copy_{from,to}_user that can be found in the
> same source directory to get a stable system on any CPU type.
A patch series to address these bugs was just posted:
https://lore.kernel.org/all/20250826160312.2070-1-kernel@mkarcher.dialup.fu-berlin.de/
Please test and report back!
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-08-26 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-24 21:09 Current state of the Linux kernel on SPARC John Paul Adrian Glaubitz
2025-08-26 16:08 ` 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=2da68167156f93a5c48e4404656036d233084501.camel@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=anthony.yznaga@oracle.com \
--cc=debian-sparc@lists.debian.org \
--cc=gentoo-sparc@lists.gentoo.org \
--cc=kernel@mkarcher.dialup.fu-berlin.de \
--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;
as well as URLs for NNTP newsgroup(s).