This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] update detect_write_exec option for apple devices
ClosedPublic

Authored by devnexen on Oct 8 2021, 1:47 AM.

Details

Summary
  • Taking in account MAP_JIT which allows W/X pages on hardened environments (and is essential on arm64 arch).

Diff Detail

Event Timeline

devnexen created this revision.Oct 8 2021, 1:47 AM
devnexen requested review of this revision.Oct 8 2021, 1:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2021, 1:47 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
devnexen updated this revision to Diff 378145.Oct 8 2021, 2:45 AM
devnexen updated this revision to Diff 378160.Oct 8 2021, 3:59 AM

LGTM with a test
maybe Apple folks want to take a look?

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
93–95

it would be nice to separate NFC changes like this and functional into a separate patches.

devnexen updated this revision to Diff 382193.Oct 25 2021, 10:38 PM
vitalybuka accepted this revision.Oct 27 2021, 1:49 PM
This revision is now accepted and ready to land.Oct 27 2021, 1:49 PM
yln added inline comments.Oct 27 2021, 5:21 PM
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
93–95

+1

97

SANITIZER_MAC implies SANITIZER_IOS; it's poorly named, but it essentially means: "any Apple platform"

98

Maybe fold this into one #if.

devnexen added inline comments.Oct 27 2021, 10:40 PM
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
97

ah good to know :)

devnexen updated this revision to Diff 382917.Oct 27 2021, 10:45 PM
yln accepted this revision.Oct 28 2021, 9:06 AM