Repository navigation
Closed
Labels
Bottom Up WorkNot part of a theme, epic, or user storyUser StoryA single user-facing feature. Can be grouped under an epic.area-Meta
Milestone
Description
We plan to enable W^X in .NET 6 on all platforms and architectures. The goal is to get rid of all memory page mappings that are both executable and writeable at the same time.
- Implement low level allocator of executable memory that will enable double mapping of executable pages with RX and RW protection to different memory locations.
- Modify code heaps in the runtime to use that allocator and provide separate RW and RX mappings and also mechanism for releasing of the RW mapping for their clients.
- Modify stub generating code to use a separate RW mapping for writing the code and to release the RW mapping after that.
- Modify JIT to a separate RW mapping for writing the code and to release the RW mapping after that.
- Modify GC write barrier switching code to use separate RW mapping for rewriting the barrier code.
- Integrate the changes with the existing W^X support for Apple M1.
- Performance validation for all architectures
- Enable by Default
Postponed to post 6.0:
- Modify selected stubs to use static code in RX pages with stub specific data read indirectly from separate RW pages. An example of such a stub is the UMEntryThunk. The benefit is that there is no need to update the code after the initial generation and thus no creation / removal of RW mapping for code is needed after the initialization.
Reacted by theolivenbaum, Kai Jellinghaus, Gamma_Draconis and Veikko Eeva
Reacted by Levi Broderick, Sergey Andreenko, Sergio Pedri, Tanner Gooding, strangeman375, Kevin Jones, theolivenbaum, Kai Jellinghaus, Gamma_Draconis, Wei Zheng and 1 more
Reacted by theolivenbaum
Reacted by Steve MacLean, Jade Macho, Alaa Masoud and leo60228
Metadata
Metadata
Assignees
Labels
Bottom Up WorkNot part of a theme, epic, or user storyUser StoryA single user-facing feature. Can be grouped under an epic.area-Meta
Type
Projects
- StatusShow more project fieldsDone
Activity
mangod9 commentedon Mar 30, 2021
@JulieLeeMSFT @sandreenko @sdmaclea FYI
mangod9 commentedon Jul 19, 2021
Closing since this is now complete. No known bugs are pending.