Make RAM dataspaces read-only (sth similar to mprotect in Linux)
David
wernerd at ...389...
Wed Mar 1 11:54:23 CET 2017
Dear Genode community,
I've joined Denis Huber's project on developing a real-time
checkpoint/restore component for Genode.
( https://sourceforge.net/p/genode/mailman/message/35211808/ )
In order to improve our process of memory checkpointing we would like to
distinguish reading memory accesses from writing memory accesses.
While we do not care about reading, we are highly interested in
detecting the occurrence of writing accesses.
At the moment our way to detect the access to a specific memory region
is to detach the corresponding dataspace and handle
the pagefault which is produced when the component tries to access the
dataspace.
We are aware that it is possible to determine whether a writing or a
reading access triggered a pagefault but we don't want to increase
the amount of pagefaults by detaching dataspaces after every time they
were only read. It would be cool if writing would cause an error
which is is not produced by reading.
As a solution to this we thought of adding the possibility to make a RAM
dataspace read-only, something which is similar to „mprotect“ in Linux.
With this feature we would not need to detach dataspaces but writing
accesses would still produce faults which we could track in order to
detect them.
Is such an alteration of RAM dataspaces possible? If yes, how would you
do it?
What kind of fault would be triggered if someone tries to write to a
read-only memory?
Are we able to get information about such a fault in Genode?
We are using Genode on top of the Fiasco.OC.
Thanks in advance!
Kind Regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20170301/058560e5/attachment.html>
More information about the users
mailing list