crash/memory_driver
Dave Anderson fad29db973 Fix the sample crash.ko memory driver to prevent an s390X kernel
addressing exception.  Legitimate pages of RAM that successfully
pass the page_is_ram() and pfn_valid() verifier functions may not
be provided by the s390x hypervisor, and the memcpy() from the
non-existent memory to the bounce buffer panics the kernel.  The
patch replaces the the memcpy() call with probe_kernel_read().
(anderson@redhat.com)
2018-02-08 10:23:50 -05:00
..
crash.c Fix the sample crash.ko memory driver to prevent an s390X kernel 2018-02-08 10:23:50 -05:00
Makefile Initial commit: crash-7.0.4 2014-01-28 16:46:11 -05:00
README Update of the sample memory_driver/crash.c /dev/crash kernel driver 2016-11-22 11:43:40 -05:00

For live system analysis, the physical memory source must be one
of the following devices:

  /dev/mem
  /proc/kcore
  /dev/crash

If the live system kernel was configured with CONFIG_STRICT_DEVMEM
or CONFIG_HARDENED_USERCOPY, then /dev/mem cannot be used. 

If the live system kernel was configured without CONFIG_PROC_KCORE,
or if /proc/kcore is non-functional, then /proc/kcore cannot be used.  

The third alternative is this /dev/crash driver.  Presuming that 
/lib/modules/`uname -r`/build points to a kernel build tree or
kernel "devel" package tree, the module can simply be built and
installed like so:

  # make
  ...
  # insmod crash.ko

Once installed, the /dev/crash driver will be used by default for
live system crash sessions.