Files
linux-kernel-module-cheat/kernel_modules/dump_regs.c
Ciro Santilli 六四事件 法轮功 2ccce0cf1f Convert LKMC_DUMP_SYSTEM_REGS to a function lkmc_dump_system_regs
Add ID_AA64ISAR1_EL1.JSCVT.
2020-06-05 02:00:01 +00:00

26 lines
463 B
C

/* https://cirosantilli.com/linux-kernel-module-cheat#dump-regs */
#include <linux/module.h>
#include <linux/kernel.h>
#define LKMC_DUMP_SYSTEM_REGS_PRINTF pr_info
#if defined(__aarch64__)
#include <lkmc/aarch64_dump_regs.h>
#else
#define LKMC_DO_NOTHING
#endif
static int myinit(void)
{
#if !defined(LKMC_DO_NOTHING)
lkmc_dump_system_regs();
#endif
return 0;
}
static void myexit(void) {}
module_init(myinit)
module_exit(myexit)
MODULE_LICENSE("GPL");