summaryrefslogtreecommitdiff
path: root/package/boot/kexec-tools/patches/120-fail-to-get-symbol-debug.patch
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2017-03-21 21:55:23 -0600
committerJo-Philipp Wich <jo@mein.io>2017-12-13 14:59:22 +0100
commit91821c8c0b183337c5b93d5bf915cef314164c2b (patch)
tree0aacb03e689931061649275e048815c6fc2e2ef0 /package/boot/kexec-tools/patches/120-fail-to-get-symbol-debug.patch
parentaffff027984f877d6faad52eb2431f869d3af6b0 (diff)
downloadmtk-20170518-91821c8c0b183337c5b93d5bf915cef314164c2b.zip
mtk-20170518-91821c8c0b183337c5b93d5bf915cef314164c2b.tar.gz
mtk-20170518-91821c8c0b183337c5b93d5bf915cef314164c2b.tar.bz2
kexec-tools: get kexec running on MUSL and x86 hardware
Couple of important upstream patches (slated for 2.0.15) that are necessary for kexec to run on MUSL and on x86 hardware. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> (cherry picked from commit dfacdc6a99757fcf7804b38784fc24f9fad30650)
Diffstat (limited to 'package/boot/kexec-tools/patches/120-fail-to-get-symbol-debug.patch')
-rw-r--r--package/boot/kexec-tools/patches/120-fail-to-get-symbol-debug.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/boot/kexec-tools/patches/120-fail-to-get-symbol-debug.patch b/package/boot/kexec-tools/patches/120-fail-to-get-symbol-debug.patch
new file mode 100644
index 0000000..d80c6db
--- /dev/null
+++ b/package/boot/kexec-tools/patches/120-fail-to-get-symbol-debug.patch
@@ -0,0 +1,33 @@
+commit 263e45ccf27b21e9862cc538ed28978533d04e4b
+Author: Baoquan He <bhe@redhat.com>
+Date: Fri Mar 3 11:52:15 2017 +0800
+
+ Only print debug message when failed to serach for kernel symbol from /proc/kallsyms
+
+ Kernel symbol page_offset_base could be unavailable when mm KASLR code is
+ not compiled in kernel. It's inappropriate to print out error message
+ when failed to search for page_offset_base from /proc/kallsyms. Seems now
+ there is not a way to find out if mm KASLR is compiled in or not. An
+ alternative approach is only printing out debug message in get_kernel_sym
+ if failed to search a expected kernel symbol.
+
+ Do it in this patch, a simple fix.
+
+ Signed-off-by: Baoquan He <bhe@redhat.com>
+ Reviewed-by: Pratyush Anand <panand@redhat.com>
+ Acked-by: Dave Young <dyoung@redhat.com>
+ Signed-off-by: Simon Horman <horms@verge.net.au>
+
+diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
+index 88aeee3..c4cf201 100644
+--- a/kexec/arch/i386/crashdump-x86.c
++++ b/kexec/arch/i386/crashdump-x86.c
+@@ -127,7 +127,7 @@ static unsigned long long get_kernel_sym(const char *symbol)
+ }
+ }
+
+- fprintf(stderr, "Cannot get kernel %s symbol address\n", symbol);
++ dbgprintf("Cannot get kernel %s symbol address\n", symbol);
+ return 0;
+ }
+