Memory Protection (Attributes)
Peter Dufault
dufault at hda.com
Tue Dec 6 13:00:41 UTC 2011
On Dec 5, 2011, at 5:02 , Gedare Bloom wrote:
>>> I will give you my feedback without a particular order.
>
And here's some of mine.
1. If "rtems_memory_protection_region_descriptor" is "A region of contiguous memory" then maybe it should just be "rtems_contiguous_memory_region".
2. I'd suggest "mprotect" for the abbreviation for when you really want "memory_protection", though I know RTEMS likes to not abbreviate.
3. I agree, "bounds" should just be "size" or "length". I'd go with "length", "man mmap" yields "size_t length" on linux and "size_t len" in open group.
4. Is it possible to just use PROT_NONE, PROT_READ, PROT_WRITE, PROT_EXEC from sys/mman? They may at least be the same definition. Since these "PROT_FOO" are already defined I see little reason for RTEMS_MEMORY_PROTECTION_EXECUTE_PERMISSION verbosity, at most I'd go with RTEMS_PROT_EXEC.
5. I think we should add an enumeration of use cases (I'll embrace the term), it will help those who tend not to think of memory protection and real-time as going together. My current uses:
- Map code read-only
- Unmap low page
- Map RAM in place of flash when debugging
My desired uses:
- Per-task private heap regions.
- Per-task private stacks.
Peter
-----------------
Peter Dufault
HD Associates, Inc. Software and System Engineering
More information about the devel
mailing list