Re: [PATCH] Fix warning about kernel version inconsistency during crash startup

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

 



On 2023/07/21 13:36, Lianbo Jiang wrote:
> Currently, the symbol ".rodata" may not be found in some vmlinux, and
> the strings command will still be used to get the linux banner string,
> but this gets two strings as below:
> 
>    # strings /usr/lib/debug/usr/lib/modules/6.5.0-0.rc2.17.fc39.x86_64/vmlinux |grep  "Linux version"
>    Linux version 6.5.0-0.rc2.17.fc39.x86_64 (mockbuild@23a79bad375e4c2c8c60f2d40df7df49) (gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4), GNU ld version 2.40-9.fc39) # SMP PREEMPT_DYNAMIC
>    Linux version 6.5.0-0.rc2.17.fc39.x86_64 (mockbuild@23a79bad375e4c2c8c60f2d40df7df49) (gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4), GNU ld version 2.40-9.fc39) #1 SMP PREEMPT_DYNAMIC Mon Jul 17 14:57:35 UTC 2023
> 
> In the verify_namelist(), the while-loop will only determine if the
> above first string(linux banner) matches and break the loop. But
> actually the above second string is correct one. Eventually, crash
> startup with the following warning:
> 
>    # ./crash -s /usr/lib/debug/usr/lib/modules/6.5.0-0.rc2.17.fc39.x86_64/vmlinux /var/crash/127.0.0.1-2023-07-20-20\:50\:50/vmcore
>    WARNING: kernel version inconsistency between vmlinux and dumpfile
> 
>    # ./crash -s
>    WARNING: kernel version inconsistency between vmlinux and live memory
> 
> Let's always try to match the correct one, otherwise still prints a
> warning as before.
> 
> Signed-off-by: Lianbo Jiang <lijiang@xxxxxxxxxx>
> ---
>   kernel.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/kernel.c b/kernel.c
> index 546eed95eebd..9801812387bd 100644
> --- a/kernel.c
> +++ b/kernel.c
> @@ -1375,8 +1375,6 @@ verify_namelist()
>   				buffer3[i++] = *p1++;
>   			buffer3[i] = NULLCHAR;
>   		}
> -
> -		break;
>           }
>           pclose(pipe);
>   

This fix itself looks good.

Acked-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>

will merge this later.

Thanks,
Kazu
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux