[PATCH] D89993: [GWP-ASan] Refactor memory mapping functions
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 10:32:28 PDT 2020
hctim accepted this revision.
hctim added inline comments.
This revision is now accepted and ready to land.
================
Comment at: compiler-rt/lib/gwp_asan/guarded_pool_allocator.h:128
+ // The pool memory is initially reserved and inaccessible, and RW mappings are
+ // subsequently created and destroyed via commitPool() and decommitPool().
+ // Each mapping is named on platforms that support it, primarily Android. This
----------------
nits just to be really clear/descriptive with the function names.
`mapWithRW()`
`reserveGuardedPool()`
`commitGuardedPoolRegionWithRW()`
`decommitGuardedPoolRegion()`
`unreserveGuardedPool()`
Also can you add a comment above why the pool is special? Something like:
```
The pool is managed separately, as some platforms (particularly Fuchsia) manage virtual memory regions as a chunk where individual pages can still have separate permissions. These platforms maintain metadata about the region in order to perform operations. The pool is unique as it's the only thing in GWP-ASan that treats pages in a single VM region on an individual basis for page protection.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89993/new/
https://reviews.llvm.org/D89993
More information about the llvm-commits
mailing list