Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Epic: Enable W^X #50391

Closed
Closed

Description

@janvorli

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.

Activity

  1. added this to the 6.0.0 milestone on Mar 29, 2021
  2. ghost added
    untriaged
    on Mar 29, 2021
  3. added
    User Story
    and removed
    untriaged
    on Mar 29, 2021
  4. mangod9 commented on Mar 30, 2021

    @mangod9
    Member
  5. added
    Bottom Up Work
    on Mar 30, 2021
  6. mangod9 commented on Jul 19, 2021

    @mangod9
    Member

    Closing since this is now complete. No known bugs are pending.

  7. ghost locked as resolved and limited conversation to collaborators on Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bottom Up WorkUser Storyarea-Meta

    Type

    No type

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions