On 07/22/2012 10:15 PM, Martin Decky wrote: >> I thought that since as_area_create() doesn't allow this, changing >> flags after creation would make no difference. >> It would seem that this restriction is some kind of leftover from the >> past. > > I am quite puzzled here: There must have been some reasonable motivation > behind this (besides security), but the comment near the condition in > as_area_create() which explicitly disallows the creation of writeable > and executable areas offers no explanation. > > Those lines were committed by Jakub J. as revision 1048 back in the old > Subversion repository. Jakub, can you please remember what was the > motivation for this?
Well, the initial idea to only support either writable xor executable areas was indeed motivated by security reasons. Then came Jiri and he needed the forbidden combination for the loader: when loading executable code, you first need to read it from a file and then write it to the target address space area. In this regard, as_area_change_flags() can be considered a workaround or a sort of a hack. Of course, you need something like this when you want to support self-modifying code. Jakub _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
