14
0
forked from pool/crash
Files
crash/crash-patch-gdb.patch

33 lines
918 B
Diff
Raw Permalink Normal View History

From: Petr Tesarik <ptesarik@suse.cz>
Subject: Apply custom patches to gdb
Upstream: never
Enhance the crash specfile to allow applying custom patches.
Update jeffm 17 Sep 2014: What used to be in the series file is now in
gdb-7.6-ppc64le-support.patch. We used to apply it unconditionally so
we'll continue to do so.
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
Makefile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Accepting request 1112906 from home:dmair:branches:Kernel:kdump:crash-1190434 - On initialization crash verifies the core based on the text referenced by the linux_banner symbol in the supplied core. It chooses how to get the address of the text based on the symbol type decoded with gdb. For some compressed kernels with an accessible debuginfo file the type is not supported (bss segment found, data reference expected) but the symbol and it's value are valid. This causes the linux_banner text to be used as the "address" of the linux_banner and that's an invalid address for the coredump causing crash to fail to load reporting something like: WARNING: invalid linux_banner pointer: 65762078756e694c where the address is obviously ASCII text used as a number. A SUSE patch to support compressed kernel binaries introduces the behavior, it does not happen for upstream crash source as-is. The difference is whether the symbol details are obtained from the kernel binary or debuginfo (fails for some debuginfos). * crash-get-linux_banner-without-using-syment-type.patch In verify_version(), choose how to obtain the linux_banner address based on the result of get_symbol_type() instead. TYPE_CODE_ARRAY causes the value of the symbol obtained from gdb to be used. TYPE_CODE_PTR causes the sybol data to be read to get the address. Default is unrecognized type but a warning is shown and the value obtained from gdb used as a best case choice. (bsc#1190434 c#24) OBS-URL: https://build.opensuse.org/request/show/1112906 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/crash?expand=0&rev=384
2023-09-22 16:02:04 +00:00
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
Accepting request 1112906 from home:dmair:branches:Kernel:kdump:crash-1190434 - On initialization crash verifies the core based on the text referenced by the linux_banner symbol in the supplied core. It chooses how to get the address of the text based on the symbol type decoded with gdb. For some compressed kernels with an accessible debuginfo file the type is not supported (bss segment found, data reference expected) but the symbol and it's value are valid. This causes the linux_banner text to be used as the "address" of the linux_banner and that's an invalid address for the coredump causing crash to fail to load reporting something like: WARNING: invalid linux_banner pointer: 65762078756e694c where the address is obviously ASCII text used as a number. A SUSE patch to support compressed kernel binaries introduces the behavior, it does not happen for upstream crash source as-is. The difference is whether the symbol details are obtained from the kernel binary or debuginfo (fails for some debuginfos). * crash-get-linux_banner-without-using-syment-type.patch In verify_version(), choose how to obtain the linux_banner address based on the result of get_symbol_type() instead. TYPE_CODE_ARRAY causes the value of the symbol obtained from gdb to be used. TYPE_CODE_PTR causes the sybol data to be read to get the address. Default is unrecognized type but a warning is shown and the value obtained from gdb used as a best case choice. (bsc#1190434 c#24) OBS-URL: https://build.opensuse.org/request/show/1112906 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/crash?expand=0&rev=384
2023-09-22 16:02:04 +00:00
@@ -293,6 +293,11 @@ gdb_unzip:
gdb_patch:
if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ]; then \
patch -p0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; fi
+ if [ -f ${GDB}.series ]; then \
+ while read p; do \
+ patch -d ${GDB} -p1 -F0 < "$$p" ; \
+ done < ${GDB}.series ; \
+ fi
library: ${OBJECT_FILES}
ar -rs ${PROGRAM}lib.a ${OBJECT_FILES}