summaryrefslogtreecommitdiff
path: root/docs/users_guide/8.10.1-notes.rst
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-10-28 00:34:09 -0400
committerBen Gamari <ben@smart-cactus.org>2019-11-02 11:00:36 -0400
commita3134cf9bf27acebb99da17ef0edc3f94b77afbb (patch)
treec5fcacd63ae556fabb15d723187fad3170b37220 /docs/users_guide/8.10.1-notes.rst
parent9980fb58f613ee3363c7e4cb86453e542c6c69aa (diff)
downloadhaskell-wip/linker-noexec.tar.gz
rts/linker: Ensure that code isn't writablewip/linker-noexec
For many years the linker would simply map all of its memory with PROT_READ|PROT_WRITE|PROT_EXEC. However operating systems have been becoming increasingly reluctant to accept this practice (e.g. #17353 and #12657) and for good reason: writable code is ripe for exploitation. Consequently mmapForLinker now maps its memory with PROT_READ|PROT_WRITE. After the linker has finished filling/relocating the mapping it must then call mmapForLinkerMarkExecutable on the sections of the mapping which contain executable code. Moreover, to make all of this possible it was necessary to redesign the m32 allocator. First, we gave (in an earlier commit) each ObjectCode its own m32_allocator. This was necessary since code loading and symbol resolution/relocation are currently interleaved, meaning that it is not possible to enforce W^X when symbols from different objects reside in the same page. We then redesigned the m32 allocator to take advantage of the fact that all of the pages allocated with the allocator die at the same time (namely, when the owning ObjectCode is unloaded). This makes a number of things simpler (e.g. no more page reference counting; the interface provided by the allocator for freeing is simpler). See Note [M32 Allocator] for details.
Diffstat (limited to 'docs/users_guide/8.10.1-notes.rst')
-rw-r--r--docs/users_guide/8.10.1-notes.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/users_guide/8.10.1-notes.rst b/docs/users_guide/8.10.1-notes.rst
index 911e123c59..b405520c70 100644
--- a/docs/users_guide/8.10.1-notes.rst
+++ b/docs/users_guide/8.10.1-notes.rst
@@ -205,6 +205,11 @@ GHCi
Runtime system
~~~~~~~~~~~~~~
+- The runtime system linker now marks loaded code as non-writable (see
+ :ghc-ticket:`14069`) on all tier-1 platforms. This is necesaary for
+ out-of-the-box compatibility with OpenBSD and macOS Catalina (see
+ :ghc-ticket:`17353`)
+
Template Haskell
~~~~~~~~~~~~~~~~