We can now successfully copy char *argv[] user array.

After a lot of magic pointer arithmetic and mapping.
This commit is contained in:
Bahadir Balban
2008-11-25 11:05:41 +02:00
parent 0ddb8ea799
commit a9e6aabcae
6 changed files with 223 additions and 40 deletions

View File

@@ -896,8 +896,8 @@ struct page *task_virt_to_page(struct tcb *t, unsigned long virtual)
/* First find the vma that maps that virtual address */
if (!(vma = find_vma(virtual, &t->vm_area_head->list))) {
printf("%s: No VMA found for 0x%x on task: %d\n",
__FUNCTION__, virtual, t->tid);
//printf("%s: No VMA found for 0x%x on task: %d\n",
// __FUNCTION__, virtual, t->tid);
return PTR_ERR(-EINVAL);
}
@@ -923,7 +923,7 @@ struct page *task_virt_to_page(struct tcb *t, unsigned long virtual)
&vma->vm_obj_list))) {
printf("%s:%s: Traversed all shadows and the original "
"file's vm_object, but could not find the "
"faulty page in this vma.\n",__TASKNAME__,
"page in this vma.\n",__TASKNAME__,
__FUNCTION__);
BUG();
}