120-fail-to-get-symbol-debug.patch 1.3 KB

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