kexec-tools: get kexec running on MUSL and x86 hardware
[openwrt/openwrt.git] / package / boot / kexec-tools / patches / 120-fail-to-get-symbol-debug.patch
1 commit 263e45ccf27b21e9862cc538ed28978533d04e4b
2 Author: Baoquan He <bhe@redhat.com>
3 Date: Fri Mar 3 11:52:15 2017 +0800
4
5 Only print debug message when failed to serach for kernel symbol from /proc/kallsyms
6
7 Kernel symbol page_offset_base could be unavailable when mm KASLR code is
8 not compiled in kernel. It's inappropriate to print out error message
9 when failed to search for page_offset_base from /proc/kallsyms. Seems now
10 there is not a way to find out if mm KASLR is compiled in or not. An
11 alternative approach is only printing out debug message in get_kernel_sym
12 if failed to search a expected kernel symbol.
13
14 Do it in this patch, a simple fix.
15
16 Signed-off-by: Baoquan He <bhe@redhat.com>
17 Reviewed-by: Pratyush Anand <panand@redhat.com>
18 Acked-by: Dave Young <dyoung@redhat.com>
19 Signed-off-by: Simon Horman <horms@verge.net.au>
20
21 diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
22 index 88aeee3..c4cf201 100644
23 --- a/kexec/arch/i386/crashdump-x86.c
24 +++ b/kexec/arch/i386/crashdump-x86.c
25 @@ -127,7 +127,7 @@ static unsigned long long get_kernel_sym(const char *symbol)
26 }
27 }
28
29 - fprintf(stderr, "Cannot get kernel %s symbol address\n", symbol);
30 + dbgprintf("Cannot get kernel %s symbol address\n", symbol);
31 return 0;
32 }
33