split kernel module api docs to README

This commit is contained in:
Ciro Santilli
2018-07-01 23:37:37 +01:00
parent 8f37cd0d22
commit 6c241279a6
18 changed files with 490 additions and 296 deletions

View File

@@ -1,10 +1,4 @@
/*
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>
*/
/* https://github.com/cirosantilli/linux-kernel-module-cheat#vermagic */
#include <linux/module.h>
#include <linux/kernel.h>
@@ -12,7 +6,9 @@ TODO how to get the vermagic from running kernel from userland?
static int myinit(void)
{
pr_info(__FILE__ "\n");
pr_info("VERMAGIC_STRING = " VERMAGIC_STRING "\n");
/* Nice try, but it is not a member. */
/*pr_info("THIS_MODULE->vermagic = %s\n", THIS_MODULE->vermagic);*/
return 0;
}