Does that even work in W^X platforms? Context for my response has that assumption, we can't simply throw it out the window, right?
I think I read somewhere about making two mappings to the same physical page (one W, one X), are you referring to that?
(I'd still need to know how that works as it kinda defeats the protection, the OS should prohibit that, right?)