···203203 int prot = 0;
204204 int ret;
205205206206+ // mach_vm_protect() on a remote process is not trivial to implement
207207+ // in a LKM. We simulate success. At the same time, we allow mach_vm_write()
208208+ // to work even if the target page is R/O (like ptrace(POKE_DATA)).
206209 if (target != 0 && target != mach_task_self())
207207- return KERN_FAILURE;
210210+ return KERN_SUCCESS;
208211209212 if (new_protection & VM_PROT_READ)
210213 prot |= PROT_READ;