[all-commits] [llvm/llvm-project] ba0e71: Do not map read-only data memory sections with EXE...
David Turner via All-commits
all-commits at lists.llvm.org
Wed Aug 5 01:56:07 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ba0e71432a60e1fa2da9e098cbc574a1d9b9618b
https://github.com/llvm/llvm-project/commit/ba0e71432a60e1fa2da9e098cbc574a1d9b9618b
Author: David Turner <digit at google.com>
Date: 2020-08-05 (Wed, 05 Aug 2020)
Changed paths:
M llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
Log Message:
-----------
Do not map read-only data memory sections with EXECUTE flags.
The code in SectionMemoryManager.cpp unnecessarily maps
read-only data sections with the READ+EXECUTE flags. This is
undesirable from a security stand-point.
Moreover, on the Fuchsia platform, which is now very strict
about mapping pages with the EXECUTE permission, this simply
fails, because the section's pages were initially allocated
with only the READ+WRITE flags.
A more detailed description of the issue can be found in this
public SwiftShader bug:
https://issuetracker.google.com/issues/154586551
This patch just restrict the mapping to the READ flag for ROData
sections. Code sections are still mapped with READ+EXECUTE as
expected.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D78574
More information about the All-commits
mailing list