This commit is contained in:
zy
2023-11-23 00:29:21 -05:00
parent 1ba029a6b8
commit ac287cdb63
5 changed files with 85 additions and 5 deletions

View File

@@ -256,10 +256,20 @@ static int diagnose_task_raw_stack_remote(struct task_struct *tsk, void *to,
int ret;
struct mm_struct *mm;
if (in_atomic() || irqs_disabled()) {
if (in_atomic()) {
printk("task_raw_stack_remote %d in_atomic\n", tsk->pid);
return 0;
}
if (irqs_disabled()) {
printk("task_raw_stack_remote %d irqs_disabled\n", tsk->pid);
return 0;
}
// if (in_atomic() || irqs_disabled()) {
// return 0;
// }
mm = get_task_mm(tsk);
if (!mm)
return 0;
@@ -267,6 +277,8 @@ static int diagnose_task_raw_stack_remote(struct task_struct *tsk, void *to,
ret = orig_access_remote_vm(mm, (unsigned long)from, to, n, 0);
mmput(mm);
printk("task_raw_stack_remote %d access_remote_vm %d\n", tsk->pid, ret);
return ret < 0 ? ret : 0;
}