[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New Debian sparc64 test kernel for stack corruption issue



Hi Gregor,

On Fri, 2025-11-14 at 00:38 +0100, Gregor Riepl wrote:
> > I think the problem was that the generated kernel image is compressed which is why it
> > won't work with GRUB unless to decompress it first on the target machine.
> 
> Huh, you're right!
> 
> At first glance, I thought there was a build option for this.
> And there is, in fact, but it gets autoremoved if you try to set it on sparc64.
> This thread[1] hints that setting HAVE_KERNEL_UNCOMPRESSED helps, so I added
> "select HAVE_KERNEL_UNCOMPRESSED=y" to arch/sparc/Kconfig helped, but this didn't work.
> I still ended up with a gzip-compressed /boot/vmlinuz. :(

I think powerpc doesn't build a compressed kernel by default, so it should be possible
do set this as default for sparc as well. I just didn't have the time to work on this
yet.

> But no worries, decompressing it manually isn't a big deal.

Yeah, but the problem is that some people don't know this and wonder why GRUB fails to
boot the kernel.

> > > apt install gcc-sparc64-linux-gnu libdw-dev:native libssl-dev:sparc64
> > 
> > What's libssl-dev needed for?
> I have no idea... the build process seems to use some Debian functionality, and it complains if the package isn't installed.
> Oh, and I forgot... you still need to force cross-compilation, but you can use the Debian compiler instead:
> 
> export CROSS_COMPILE=sparc64-linux-gnu-
> export ARCH=sparc
> 
> And I can confirm that the resulting kernel boots fine.

Good.

> However... I can't seem to get KGDB to work. :(
> This kernel has it enabled:
> grep KGDB .config
> CONFIG_HAVE_ARCH_KGDB=y
> CONFIG_KGDB=y
> CONFIG_KGDB_HONOUR_BLOCKLIST=y
> CONFIG_KGDB_SERIAL_CONSOLE=y
> # CONFIG_KGDB_TESTS is not set
> CONFIG_KGDB_KDB=y
> 
> But when I try to configure it, I get:
> echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc
> bash: echo: write error: No such device
> 
> Configuring through the kernel command line doesn't work either.
> 
> The only KGDB-related message I see in dmesg is:
> platform kgdboc: deferred probe pending: (reason unknown)
> 
> Any ideas?

I don't have any experience with KGDB, sorry.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: