From cdbae1f86a205013ae33b107c4a282e55a209eed Mon Sep 17 00:00:00 2001 From: kovalenko Date: Tue, 21 Dec 2010 11:18:56 +0300 Subject: [PATCH] Branch is ready to be merged with master --- driver/us_proc_inst.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index f06433b..ede0e92 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -331,13 +331,21 @@ static int install_mapped_ips (struct task_struct *task, inst_us_proc_t* task_in vma = mm->mmap; while (vma) { // skip non-text section +#ifndef ANDROID + if (!(vma->vm_flags & VM_EXEC) || !vma->vm_file || (vma->vm_flags & VM_ACCOUNT) || + !(vma->vm_flags & (VM_WRITE | VM_MAYWRITE)) || + !(vma->vm_flags & (VM_READ | VM_MAYREAD))) { +#else if (!(vma->vm_flags & VM_EXEC) || !vma->vm_file /*|| (vma->vm_flags & VM_ACCOUNT)*/ /*|| !(vma->vm_flags & (VM_WRITE | VM_MAYWRITE)) || !(vma->vm_flags & (VM_READ | VM_MAYREAD))*/) { +#endif vma = vma->vm_next; continue; } +#ifdef ANDROID vma->vm_flags |= (VM_WRITE | VM_MAYWRITE | VM_READ | VM_MAYREAD); +#endif /** * After process was forked, some time it inherits parent process environment. -- 2.7.4