mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
Less converstaion
This commit is contained in:
21
kernel_module/vermagic.c
Normal file
21
kernel_module/vermagic.c
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
insmod /vermagic.ko
|
||||
# => 4.9.6 SMP mod_unload modversions
|
||||
TODO how to get the vermagic from running kernel from userland? <https://lists.kernelnewbies.org/pipermail/kernelnewbies/2012-October/006306.html>
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/vermagic.h>
|
||||
|
||||
static int myinit(void)
|
||||
{
|
||||
pr_info(VERMAGIC_STRING "\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void myexit(void) {}
|
||||
|
||||
module_init(myinit)
|
||||
module_exit(myexit)
|
||||
MODULE_LICENSE("GPL");
|
||||
Reference in New Issue
Block a user