[PATCH] D93731: scudo: Support memory tagging in the secondary allocator.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 15:50:37 PST 2021


hctim added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:833
   void disableMemoryTagging() {
-    if (allocatorSupportsMemoryTagging<Params>())
+    initThreadMaybe();
+    if (allocatorSupportsMemoryTagging<Params>()) {
----------------
Yeah, this unfortunately means that some of the sizeclasses get mapped as PROT_MTE even when MTE is disabled. Maybe we should pull this change out of this patch and follow up separately, as it sounds like we might need to pull the MTE options out of the primary options bitset so it doesn't get clobbered at init-time.

```
$ adb shell process/with/no/mte
$ adb shell cat /proc/<pid>/smaps | egrep 'VmFlags.*mt' -B23
7ca588f000-7ca58cf000 rw-p 00000000 00:00 0                              [anon:scudo:primary]
VmFlags: rd wr mr mw me ac mt
7cd588c000-7cd58cc000 rw-p 00000000 00:00 0                              [anon:scudo:primary]
VmFlags: rd wr mr mw me ac mt
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93731/new/

https://reviews.llvm.org/D93731



More information about the llvm-commits mailing list