• Daniel Lehmann's avatar
    [wasm] Merge code space write scope implementations · 8a3c4881
    Daniel Lehmann authored
    Merges `NativeModuleModificationScope` (with an implementation using
    Intel PKU, if available, and mprotect otherwise) and
    `CodeSpaceWriteScope` (for Apple Silicon, where switching to RWX with
    mprotect is disallowed anyway, so MAP_JIT and thread-local switching
    must be used).
    
    Because `CodeSpaceWriteScope` sounded better (and is shorter), we kept
    its name (which unfortunately makes the diff a bit harder to read).
    
    R=clemensb@chromium.org
    CC=jkummerow@chromium.org
    
    Bug: v8:11714
    
    Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
    Change-Id: Ib2a7d18e72797a725ed34b904c70769166d811dd
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972911Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Commit-Queue: Daniel Lehmann <dlehmann@google.com>
    Cr-Commit-Position: refs/heads/master@{#75272}
    8a3c4881
module-instantiate.cc 83.4 KB