Re: ptrace and pfn mappings

From: Benjamin Herrenschmidt
Date: Tue Oct 10 2006 - 08:49:41 EST



> I think the best idea is to add a new ->access method to the vm_operations
> that's called by access_process_vm() when it exists and VM_IO or VM_PFNMAP
> are set. ->access would take the required object locks and copy out the
> data manually. This should work both for spufs and drm.

Another option is to have access_process_vm() lookup the PTE and lock it
while copying the data from the page.

something like

- lookup pte & lock
- check if pte still present
- copy data to temp kernel buffer
- unlock pte
- copy data to user buffer

Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/