ÿØÿà JFIF ` ` ÿþ
|
Server : Apache System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64 User : farolpborg ( 1053) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /usr/src/file_protector-1.1-1505/ |
Upload File : |
/**
@file
@brief Linux kernel 'module'
@details Copyright (c) 2017 Acronis International GmbH
@author Mikhail Krivtsov (mikhail.krivtsov@acronis.com)
@since $Id: $
*/
#include "debug.h" // DPRINTF
#include "syscall_common.h"
#include "task_info_map.h"
#include "tracepoints.h"
#include "transport.h"
#include <linux/module.h>
#include <linux/version.h> // LINUX_VERSION_CODE, KERNEL_VERSION()
/*
Initialization order is very important.
'transport' depends on 'pid_bw_list'
'syscall_hooks' and 'tracepoints' depend on 'transport'
*/
static int __init module_init_impl(void)
{
int ret;
IPRINTF("DRIVER_VERSION=%s", DRIVER_VERSION_STRING);
IPRINTF("LINUX_VERSION_CODE=%u.%u.%u", LINUX_VERSION_CODE >> 16,
(LINUX_VERSION_CODE >> 8) & 0xFF, LINUX_VERSION_CODE & 0xFF);
#if defined RHEL_RELEASE_CODE
IPRINTF("RHEL_RELEASE_CODE=%u.%u",
RHEL_RELEASE_CODE >> 8, RHEL_RELEASE_CODE & 0xFF);
#endif
ret = task_info_map_init();
if (ret) {
EPRINTF("'%s()' failure %i", "task_info_map_init", ret);
goto out;
}
ret = transport_mod_init();
if (ret) {
EPRINTF("'%s()' failure %i", "transport_mod_init", ret);
goto shutdown_task_info_map;
}
ret = syscall_hooks_init();
if (ret) {
EPRINTF("'%s()' failure %i", "syscall_hooks_init", ret);
goto shutdown_transport;
}
// Note: 'ret' is already 0 here
goto out;
shutdown_transport:
transport_mod_down();
shutdown_task_info_map:
task_info_map_down();
out:
DPRINTF("ret=%i", ret);
return ret;
}
static void __exit module_down_impl(void)
{
IPRINTF("module unload started");
syscall_hooks_exit();
transport_mod_down();
task_info_map_down();
IPRINTF("module unload finished");
}
MODULE_AUTHOR("Acronis International GmbH");
MODULE_DESCRIPTION("APL (Active Protection for Linux)");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRIVER_VERSION_STRING);
module_init(module_init_impl);
module_exit(module_down_impl);