This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Enabled MAP_ALLOWNOMEM for all platforms
ClosedPublic

Authored by ahomescu on Jun 13 2023, 10:50 PM.

Diff Detail

Event Timeline

ahomescu created this revision.Jun 13 2023, 10:50 PM
ahomescu requested review of this revision.Jun 13 2023, 10:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2023, 10:50 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
ahomescu updated this revision to Diff 534770.Jun 26 2023, 3:43 PM

Ran clang-format manually.

Chia-hungDuan added inline comments.Jul 11 2023, 5:10 PM
compiler-rt/lib/scudo/standalone/secondary.h
115

Can we add this to Flags at the prologue of the function instead? Like

Flags |= MAP_ALLOWNOMEM;

Maybe we can move MAP_RESIZABLE as well

compiler-rt/lib/scudo/standalone/trusty.cpp
53 ↗(On Diff #534770)

Can we do this in a dependent patch?

ahomescu updated this revision to Diff 539821.Jul 12 2023, 7:10 PM
ahomescu marked 2 inline comments as done.

Resolved comments.

ahomescu updated this revision to Diff 540593.Jul 14 2023, 4:13 PM

Ran clang-format.

Chia-hungDuan added inline comments.Jul 17 2023, 1:58 PM
compiler-rt/lib/scudo/standalone/secondary.h
108–110

We should add this flag for all platforms

ahomescu added inline comments.Jul 17 2023, 4:20 PM
compiler-rt/lib/scudo/standalone/secondary.h
108–110

Would that need extra testing? I wasn't sure if it was safe to make that change.

Chia-hungDuan added inline comments.Jul 17 2023, 6:22 PM
compiler-rt/lib/scudo/standalone/secondary.h
108–110

It's fine to just add them. Other platforms have the logic implemented

Same as D155144, please update both commit message and the title here so that we won't be confused while review these changes

ahomescu updated this revision to Diff 541300.Jul 17 2023, 6:29 PM

Enabled MAP_ALLOWNOMEM for all platforms.

ahomescu marked 2 inline comments as done.Jul 17 2023, 6:29 PM
Chia-hungDuan retitled this revision from [scudo] Return NULL on Trusty allocation failure to [scudo] Enabled MAP_ALLOWNOMEM for all platforms.Jul 24 2023, 6:11 PM
Chia-hungDuan accepted this revision.Jul 24 2023, 6:15 PM

Will merge this by tomorrow

This revision is now accepted and ready to land.Jul 24 2023, 6:15 PM