Hi Gregor, On Wed, 2024-09-04 at 01:22 +0200, Gregor Riepl wrote: > > > > It's actually pretty simple these days as the kernel.org mirrors provide > > binary > > distributions of freestanding toolchains for all major supported > > architectures > > of the Linux kernel. > > > > To set up on any x86_64 machine, do the following: > > > > # wget > > https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.2.0/x86_64-gcc-14.2.0-nolibc-sparc64-linux.tar.gz > > # tar xf x86_64-gcc-14.2.0-nolibc-sparc64-linux.tar.gz > > # export PATH=$PATH:$PWD/gcc-14.2.0-nolibc/sparc64-linux/bin/ > > # git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > # cd linux > > # export ARCH=sparc > > # export CROSS_COMPILE=sparc64-linux- > > # make sparc64_defconfig > > # make -j<number of parallel jobs> > > > > The cross-compiled kernel will be available as "vmlinux". > > Very good, thanks!
Thanks for looking into it! I'm especially interested in finding a proper reproducer which would make the bisecting process much easier. So far, the crashes seem to be rather random although they mainly occur with newer kernels. FWIW, I found a very handy patch yesterday which could help debugging these crashes once it's been merged into the upstream kernel [1]. What it does is that it dumps the back of the stack after a stack corruption has occurred which should in theory help find what part of the kernel is responsible for the stack corruption. It looks like this particular crash we have been seeing on the older SPARCs was always due to stack corruption which could mean that it's related to a driver or arch-specific code that is used on the older SPARCs but not on the newer machines. Adrian > [1] https://lore.kernel.org/lkml/20231219032254.96685-1-feng.t...@intel.com/ -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913