]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scripts/gdb/symbols: determine KASLR offset on s390 during early boot
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 15 May 2025 15:52:13 +0000 (17:52 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 May 2025 17:48:25 +0000 (10:48 -0700)
commitc164679bed3a5f0d235723c2395d9a5122b151c4
tree5f303dc271388538125e35916af8bd07d17feb6f
parente97c4a27cb9c4c06fdc6d0760d7ea031c98b58a5
scripts/gdb/symbols: determine KASLR offset on s390 during early boot

Using lx-symbols during s390 early boot fails with:

    Error occurred in Python: 'utf-8' codec can't decode byte 0xcb in position 0: invalid continuation byte

The reason is that s390 decompressor's startup_kernel() does not create
vmcoreinfo note, and sets vmcore_info to kernel's physical base.  This
confuses get_vmcore_s390().

Fix by handling this special case.  Extract vm_layout.kaslr_offset from
the kernel image in physical memory, which is placed there by the
decompressor using the __bootdata_preserved mechanism, and generate a
synthetic vmcoreinfo note from it.

Link: https://lkml.kernel.org/r/20250515155811.114392-4-iii@linux.ibm.com
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/gdb/linux/symbols.py