orig_find_task_by_vpid

This commit is contained in:
zy
2023-11-22 22:53:42 -05:00
parent aa6eb1cfca
commit 1ba029a6b8
3 changed files with 8 additions and 1 deletions

View File

@@ -16,6 +16,8 @@ int (*orig_get_task_type)(struct sched_entity *se);
int (*orig_kernfs_name)(struct kernfs_node *kn, char *buf, size_t buflen);
int (*orig_access_remote_vm)(struct mm_struct *mm, unsigned long addr,
void *buf, int len, unsigned int gup_flags);
struct task_struct *(*orig_find_task_by_vpid)(pid_t nr);
/// @brief init kallsyms_lookup_name,all orig_fun are depend on it
/// @param
@@ -55,5 +57,6 @@ int init_orig_fun(void) {
LOOKUP_SYMS_NORET(
get_task_type); // get_task_type | this fun is not available on 5.17.15
LOOKUP_SYMS_NORET(kernfs_name); // kernfs_name
LOOKUP_SYMS_NORET(find_task_by_vpid);
return 0;
}

View File

@@ -41,4 +41,5 @@ extern int (*orig_get_task_type)(struct sched_entity *se);
extern int (*orig_kernfs_name)(struct kernfs_node *kn, char *buf,
size_t buflen);
extern int (*orig_access_remote_vm)(struct mm_struct *mm, unsigned long addr,
void *buf, int len, unsigned int gup_flags);
void *buf, int len, unsigned int gup_flags);
extern struct task_struct *(*orig_find_task_by_vpid)(pid_t nr);

View File

@@ -113,6 +113,8 @@ void dump_proc_chains_argv(
int style, struct task_struct *tsk, mm_tree *mm_tree,
proc_chains_detail *detail); // get process chains argv
void diag_test(int nid); // for test
// print
// void diag_printf_kern_stack(kern_stack_detail *kern_stack);
// void diag_printf_kern_stack(kern_stack_detail *kern_stack, int reverse);
@@ -128,3 +130,4 @@ extern unsigned int (*orig_stack_trace_save_tsk)(struct task_struct *task,
unsigned long *store,
unsigned int size,
unsigned int skipnr);
extern struct task_struct *(*orig_find_task_by_vpid)(pid_t nr);