Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Feb 23, 2024
    • Baoquan He's avatar
      crash: remove dependency of FA_DUMP on CRASH_DUMP · 2c44b67e
      Baoquan He authored
      In kdump kernel, /proc/vmcore is an elf file mapping the crashed kernel's
      old memory content. Its elf header is constructed in 1st kernel and passed
      to kdump kernel via elfcorehdr_addr. Config CRASH_DUMP enables the code
      of 1st kernel's old memory accessing in different architectures.
      
      Currently, config FA_DUMP has dependency on CRASH_DUMP because fadump
      needs access global variable 'elfcorehdr_addr' to judge if it's in
      kdump kernel within function is_kdump_kernel(). In the current
      kernel/crash_dump.c, variable 'elfcorehdr_addr' is defined, and function
      setup_elfcorehdr() used to parse kernel parameter to fetch the passed
      value of elfcorehdr_addr. Only for accessing elfcorehdr_addr, FA_DUMP
      really doesn't have to depends on CRASH_DUMP.
      
      To remove the dependency of FA_DUMP on CRASH_DUMP to avoid confusion,
      rename kernel/crash_dump.c to kernel/elfcorehdr.c, and build it when
      CONFIG_VMCORE_INFO is ebabled. With this, FA_DUMP doesn't need to depend
      on CRASH_DUMP.
      
      [bhe@redhat.com: power/fadump: make FA_DUMP select CRASH_DUMP]
        Link: https://lkml.kernel.org/r/Zb8D1ASrgX0qVm9z@MiWiFi-R3L-srv
      Link: https://lkml.kernel.org/r/20240124051254.67105-4-bhe@redhat.com
      
      
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Acked-by: default avatarHari Bathini <hbathini@linux.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Pingfan Liu <piliu@redhat.com>
      Cc: Klara Modin <klarasmodin@gmail.com>
      Cc: Michael Kelley <mhklinux@outlook.com>
      Cc: Nathan Chancellor <nathan@kernel.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Yang Li <yang.lee@linux.alibaba.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      2c44b67e
  2. Apr 15, 2020
  3. May 21, 2019
  4. Aug 25, 2014
  5. Oct 31, 2011
  6. Oct 30, 2011
  7. Mar 23, 2011
    • Olaf Hering's avatar
      crash_dump: export is_kdump_kernel to modules, consolidate elfcorehdr_addr,... · 93a72052
      Olaf Hering authored
      crash_dump: export is_kdump_kernel to modules, consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn
      
      The Xen PV drivers in a crashed HVM guest can not connect to the dom0
      backend drivers because both frontend and backend drivers are still in
      connected state.  To run the connection reset function only in case of a
      crashdump, the is_kdump_kernel() function needs to be available for the PV
      driver modules.
      
      Consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn into
      kernel/crash_dump.c Also export elfcorehdr_addr to make is_kdump_kernel()
      usable for modules.
      
      Leave 'elfcorehdr' as early_param().  This changes powerpc from __setup()
      to early_param().  It adds an address range check from x86 also on ia64
      and powerpc.
      
      [akpm@linux-foundation.org: additional #includes]
      [akpm@linux-foundation.org: remove elfcorehdr_addr export]
      [akpm@linux-foundation.org: fix for Tejun's mm/nobootmem.c changes]
      Signed-off-by: default avatarOlaf Hering <olaf@aepfle.de>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      93a72052
  8. Jan 10, 2006
  9. Jan 08, 2006
  10. Jul 27, 2005
  11. Jun 25, 2005