[Crash-utility] [PATCH RESEND v2] diskdump: add hook for additional checks on prstatus notes validity
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Wed Oct 18 04:50:04 UTC 2023
On 2023/10/14 22:39, Aditya Gupta wrote:
> Upstream crash reports these warnings on PowerPC64:
>
> WARNING: cpu 0 invalid NT_PRSTATUS note (n_type != NT_PRSTATUS)
> ...
>
> Apart from these warnings, register values are also invalid.
>
> This warning was found in the commit:
>
> commit db8c030857b4 ("diskdump/netdump: fix segmentation fault
> caused by failure of stopping CPUs")
>
> With above commit, crash checks whether 'crash_notes' is initialised,
> before mapping PRSTATUS notes.
>
> But some architectures such as PowerPC64, in fadump case
> (firmware-assisted dump), don't populate 'crash_notes' since the
> registers are already stored in the cpu notes in the vmcore.
>
> Instead of checking 'crash_notes' for all architectures, introduce
> a machdep hook ('is_cpu_prstatus_valid'), for architectures to
> decide validity checks for PRSTATUS notes
>
> A default hook ('diskdump_is_cpu_prstatus_valid') has also been provided
> for all architectures other than PowerPC64, which checks if 'crash_notes'
> for a given cpu is valid, maintaining the current behaviour
>
> PowerPC64 doesn't utilise 'crash_notes' to get register values, so no
> additional checks are required
>
> Fixes: db8c030857b4 ("diskdump/netdump: fix segmentation fault caused by failure of stopping CPUs")
> Signed-off-by: Aditya Gupta <adityag at linux.ibm.com>
Thanks, looks good and applied.
https://github.com/crash-utility/crash/commit/ac097d6cb15726fa34f2d4ec5edc94aad58e0d0d
Thanks,
Kazu
More information about the Crash-utility
mailing list