Add interoperability with W^X policies
This is a feature request to add support in DR for working in the presence of W^X policies. These PaX-like policies typically disallow execution from any page that came from mmap +wx or ever had mprotect +x applied to it, which rules out writing and later marking read-only. The proposal here is to use a dual-mapping strategy: having two virtual pages backed by the same physical page, with one +rw for writing and the other +rx for execution.
This will likely be limited to 64-bit Linux but could be extended to Windows in the future if desired.
With #1132 (closed) in place, we can make a new reservation the same size as vmcode and have a constant offset between each pair of pages. We would then keep all variables tracking addresses as scalars, and when we want to write, we would simply add the offset.
It may be best to first extend #774 (closed) and #1132 (closed) to make the size of vmcode 2G by default, to avoid any issues with out-of-reservation allocations.