Hello. I want to trace all write page-faults from an application. I use the pager that wait for page-fault and maps the fpage to thread calling l4_ipc_send_and_wait setting L4_ITEM_MAP. For tracing only write page-faults I map fpage as L4_FPAGE_RO if it was read-pf and then I map the same fpage with L4_FPAGE_RW if the next write-pf occurs. (I mean I map the same fpage with the different flags twice). But an application doesn't continue run. Also I have tried to l4_task_unmap(L4_FP_OTHER_SPACES) this fpage before mapping it as L4_FPAGE_RW. It doesn't work. What should I use to change fpage's rights to L4_FPAGE_RW for fpage that is already mapped as L4_FPAGE_RO for an application?
Ivan Bludov
Hi,
On Thu Apr 05, 2012 at 16:32:22 +0400, Ivan Bludov wrote:
I want to trace all write page-faults from an application. I use the pager that wait for page-fault and maps the fpage to thread calling l4_ipc_send_and_wait setting L4_ITEM_MAP. For tracing only write page-faults I map fpage as L4_FPAGE_RO if it was read-pf and then I map the same fpage with L4_FPAGE_RW if the next write-pf occurs. (I mean I map the same fpage with the different flags twice). But an application doesn't continue run. Also I have tried to l4_task_unmap(L4_FP_OTHER_SPACES) this fpage before mapping it as L4_FPAGE_RW. It doesn't work. What should I use to change fpage's rights to L4_FPAGE_RW for fpage that is already mapped as L4_FPAGE_RO for an application?
The approach you're doing looks perfectly ok. Mapping with more rights should just work as you describe it. The source of the mapping is available as rw I suppose?
Adam
l4-hackers@os.inf.tu-dresden.de