Home Files
Adminer
Execute Command
PHP Eval
Symlink
File Upload
Owner :
www-data
PHP Version
5.6.40-0+deb8u12
Disk Space
40.99 GB
Server Addr
19-www4
Your IP
10.10.10.40
Edit File
File:
/** @file @brief Process (aka task) info storage @details Copyright (c) 2017-2021 Acronis International GmbH @author Ivan Matveev (ivan.matveev@acronis.com) @since $Id: $ */ #pragma once #include "transport_protocol.h" // task_status_t #include <linux/path.h> #include <linux/rbtree.h> #include <linux/rcupdate.h> #include <linux/spinlock.h> #include <linux/types.h> // bool typedef struct { struct rb_node rb_node; pid_t pid; atomic_t ref_cnt; spinlock_t spinlock; task_status_t status; file_key_t exe_key; bool is_exe_path_changed; } task_info_t; typedef struct task_info_map_s { atomic_t refcount; spinlock_t spinlock; struct rb_root root; struct rcu_head rcu; } task_info_map_t; #define MAX_TASK_INFO_MAP_SIZE 4 const char *task_status_to_string(task_status_t status); // on success return 0 int task_info_map_del_by_map_id(unsigned char map_id, pid_t pid); // ========================= useful wrappers ========================= // // create task_info struct if needed // errors: // 1. ENOMEM - alloc failed // 2. ENOENT - no such pid or task_struct without executable file // 3. EINVAL - task_info with sutch pid already exist - synchronisation broken int task_info_status_set_by_map_id(unsigned char map_id, pid_t pid, task_status_t status); void task_info_map_on_exit_event(pid_t tgid, pid_t pid); typedef void (*for_each_task_info_with_pid)(task_info_t *task_info, void *arg); unsigned char acquire_task_info_map(void); void release_task_info_map(unsigned char id); int check_exec_with_task_info(pid_t tgid, struct path exe_path); void task_info_maps_init(void); void task_info_maps_clear(void); bool sys_call_fs_events_should_skip(pid_t pid, uint64_t events_mask); void get_should_send_task_info_map_ids(bool *should_send_map_ids, msg_type_img_t msg_type);