[PATCH] D70762: scudo: Add initial memory tagging support.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 14:00:40 PST 2019
hctim added a comment.
> The granules
> either side of the allocation are tagged with tag 0, which is normally
> excluded from the set of tags that may be selected randomly
It seems valuable to have the LHS and RHS of an allocation as a nonzero tag. IIUC, the chunk header is on the LHS for primary allocations, and making the header MTE-protected (the tag can be stored in the Primary allocator struct somewhere) seems like a good additional security step to make it unwriteable from a deterministic (zeroed) pointer.
================
Comment at: compiler-rt/lib/scudo/standalone/primary64.h:193
+ bool useMemoryTagging() const { return SupportsMemoryTagging && UseMemoryTagging; }
+ void disableMemoryTagging() { UseMemoryTagging = false; }
----------------
Nit: line length
================
Comment at: compiler-rt/lib/scudo/standalone/primary64.h:293
}
-
const u32 NumberOfBlocks = Min(
----------------
nit: leave newline
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70762/new/
https://reviews.llvm.org/D70762
More information about the llvm-commits
mailing list