Capturing all writes as fault on a memory mapped page.

Pranay Srivastava pranjas at gmail.com
Wed May 28 09:17:24 EDT 2014


Hi

I need to capture all writes on page which is memory mapped by the
user program. I've tried setting the vm_page_prot by disabling the
VM_WRITE flag but even then the page fault occurs only once during the
first write. VM_SHARED is set to stop COW in the __do_fault.

I was also trying to set_memory_ro(this may not be available for all
archs?)  however I can't do that while handling the fault since the
page table entries are created later after the
vm_operations_struct->fault has installed the page for the fault.

I'm not having any clues on how to do this. Any help would be really
helpful on this.

Thanks
-- 
        ---P.K.S



More information about the Kernelnewbies mailing list