crash/memory_driver
Mathias Krause 578fc08b82 memory_driver: Support overriding kernel directory
Support compiling the module against a different kernel version than the
currently running one by allowing to set either KVER or KDIR variables
on the make commandline.

Also modernize the makefile slightly and make use of the kernel's
'clean' target to ensure to remove all generated files.

Signed-off-by: Mathias Krause <minipli@grsecurity.net>
2023-10-10 13:35:33 +09:00
..
crash.c memory_driver: Use designated initializer for 'crash_dev' 2023-10-10 13:35:33 +09:00
Makefile memory_driver: Support overriding kernel directory 2023-10-10 13:35:33 +09: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.