Skip to content

arm64: fall back to ramdump ELF prstatus notes when note_buf_t missing - #1

Open
miniLQ wants to merge 1 commit into
Penguin38:masterfrom
miniLQ:fix/stripped-vmlinux-note_buf-fallback
Open

miniLQ wants to merge 1 commit into
Penguin38:masterfrom
miniLQ:fix/stripped-vmlinux-note_buf-fallback

Conversation

@miniLQ

@miniLQ miniLQ commented Aug 17, 2026

Copy link
Copy Markdown

When note_buf_t does not exist in kernel's debug info (e.g. stripped vmlinux), SIZE(note_buf) returns -1 causing a fatal 'invalid structure size' error. Add a check at the beginning of arm64_get_crash_notes() to detect this condition, print a WARNING, and fall back to reading NT_PRSTATUS notes directly from the ramdump's ELF headers.

When note_buf_t does not exist in kernel's debug info (e.g. stripped vmlinux),
SIZE(note_buf) returns -1 causing a fatal 'invalid structure size' error.
Add a check at the beginning of arm64_get_crash_notes() to detect this
condition, print a WARNING, and fall back to reading NT_PRSTATUS notes
directly from the ramdump's ELF headers.

Co-Authored-By: Claude <noreply@anthropic.com>
@miniLQ
miniLQ force-pushed the fix/stripped-vmlinux-note_buf-fallback branch from a26b8da to acf3b43 Compare August 17, 2026 09:40
@miniLQ

miniLQ commented Aug 17, 2026

Copy link
Copy Markdown
Author

crash-android 9.0.2++
Copyright (C) 2002-2026 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation
Copyright (C) 1999-2006 Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited
Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011, 2020-2024 NEC Corporation
Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
Copyright (C) 2015, 2021 VMware, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter "help copying" to see the conditions.
This program has absolutely no warranty. Enter "help warranty" for details.

NOTE: setting vabits_actual to: 39

NOTE: setting phys_offset to: 0x80000000

NOTE: setting kimage_voffset to: 0xffffffbf88000000

GNU gdb (GDB) 16.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=aarch64-elf-linux".
Type "show configuration" for configuration details.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...

crash-android: invalid structure size: note_buf
FILE: arm64.c LINE: 5103 FUNCTION: arm64_get_crash_notes()

[./crash-android] error trace: 5630e5db12d3 => 5630e5e74869 => 5630e5e98e2b => 5630e5e98d9d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant