Re: Current state of the Linux kernel on SPARC

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.ports.sparc,gmane.linux.debian.ports.sparc,gmane.linux.gentoo.sparc
Message-ID <2da68167156f93a5c48e4404656036d233084501.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/[email protected]/

Please test and report back!

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.