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

60 lines
2.2 KiB
Diff
Raw Permalink Normal View History

From: Ludwig Nussel <lnussel@suse.de>
Subject: debug info is in /usr/lib/debug/usr/lib/modules
References: boo#1190434
Upstream: to be done (must not break Red Hat)
---
defs.h | 2 +-
help.c | 2 +-
symbols.c | 4 ++--
3 files changed, 4 insertions(+), 4 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/defs.h
===================================================================
--- a/defs.h
+++ b/defs.h
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
@@ -413,7 +413,7 @@ struct number_option {
#define PIPE_OPTIONS (FROM_COMMAND_LINE | FROM_INPUT_FILE | REDIRECT_TO_PIPE | \
REDIRECT_TO_STDPIPE | REDIRECT_TO_FILE)
-#define DEFAULT_REDHAT_DEBUG_LOCATION "/usr/lib/debug/lib/modules"
+#define DEFAULT_REDHAT_DEBUG_LOCATION "/usr/lib/debug/usr/lib/modules"
#define MEMORY_DRIVER_MODULE "crash"
#define MEMORY_DRIVER_DEVICE "/dev/crash"
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/help.c
===================================================================
--- a/help.c
+++ b/help.c
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
@@ -9649,7 +9649,7 @@ README_ENTER_DIRECTORY,
README_MEMORY_DRIVER,
"",
" If the kernel file is stored in /boot, /, /boot/efi, or in any /usr/src",
-" or /usr/lib/debug/lib/modules subdirectory, then no command line arguments",
+" or " DEFAULT_REDHAT_DEBUG_LOCATION " subdirectory, then no command line arguments",
" are required -- the first kernel found that matches /proc/version will be",
" used as the namelist.",
" ",
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/symbols.c
===================================================================
--- a/symbols.c
+++ b/symbols.c
@@ -335,7 +335,7 @@ check_gnu_debuglink(bfd *bfd)
if ((pc->debuginfo_file = (char *)
malloc(((strlen(namelist) + strlen("/.debug/") +
- + strlen(".debug") + strlen(" /usr/lib/debug/boot/ "))*10)
+ + strlen(".debug") + strlen(" /usr/lib/debug/usr/lib/modules/ "))*10)
+ strlen(pc->namelist_debug ? pc->namelist_debug : " "))) == NULL)
error(FATAL, "debuginfo file name malloc: %s\n",
strerror(errno));
@@ -411,7 +411,7 @@ check_gnu_debuglink(bfd *bfd)
}
}
- sprintf(pc->debuginfo_file, "/usr/lib/debug/boot/%s", contents);
+ sprintf(pc->debuginfo_file, "/usr/lib/debug/%s/%s", dirname, contents);
if (separate_debug_file_exists(pc->debuginfo_file, crc32, &exists)) {
if (CRASHDEBUG(1))
fprintf(fp, "%s: CRC matches\n", pc->debuginfo_file);