Hi David,
Does the '_write' flag in 'Rm_region' already specify whether the 'Region' is writable or not? May i use it to determine if the corresponding Mapping should be writable or do i need to implement another flag?
indeed, the flag is unused right now but it was apparently designated for this purpose. Please go ahead with using it.
By specifying that a dataspace should be attached read-only, the resulting mapping will always be read-only regardless of whether the underlying dataspace is writable. As far as I see, the implementation wouldn't be too hard. When resolving page faults, the pager would logically-AND the r/w conditions of the traversed region maps (they may be nested so the downgrade from RW to RO could happen at any level) with the property of the dataspace.
As far as i can follow your description i would have to do the following two things:
- Provide an alternative implementation for
'Region_map_component::attach' which allows to create a read-only 'Region' (corresponding flag set)
- Modify the method 'Rm_client::pager' in order to take the flag of the
region into account when creating mappings. (At the moment only the property of the dataspace is considered)
Is that everything or did i miss something?
As far as I can see, that's all. Good luck!
Cheers Norman