This commit is contained in:
zy
2023-11-16 17:39:26 +08:00
parent bd277b53c5
commit 67b53ae048
11 changed files with 710 additions and 639 deletions

View File

@@ -0,0 +1,21 @@
#include <linux/list.h>
// for memory access
// #include <linux/sched.h>
typedef struct {
pid_t task_id; // current process id
struct page *page;
void *kaddr;
struct list_head entry;
} watch_local_memory;
// Global variable
static LIST_HEAD(watch_local_memory_list);
void *convert_user_space_ptr(pid_t pid, unsigned long kaddr);
void free_page_list(pid_t task_id);
void free_all_page_list(void);
unsigned char read_and_compare(void *ptr, int len, unsigned char greater_flag,
unsigned char is_unsigned, long long threshold);