-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.c
34 lines (29 loc) · 786 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/version.h>
#include <linux/gfp.h>
#include <linux/slab.h>
#include "main_thread.h"
#include "hash.h"
#include "persistency.h"
#include "const.h"
#include "self_protect.h"
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Rhydon");
static int patch_guard_init(void)
{
struct ValidatorMd5* validators;
printk(KERN_INFO "Hello...\n");
validators = kmalloc(sizeof(struct ValidatorMd5), GFP_KERNEL);
kthread_run(main_validation_logic_thread, (void*)validators, "patch_guard_thread");
return SUCCESS;
}
static void patch_guard_exit(void)
{
printk(KERN_INFO "Bye ...\n");
}
module_init(patch_guard_init);
module_exit(patch_guard_exit);