[compiler-rt] [msan] Re-exec with no ASLR if memory layout is incompatible on Linux (PR #85142)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 15:51:14 PDT 2024


================
@@ -106,7 +107,8 @@ const MappingDesc kMemoryLayout[] = {
     {0x510000000000ULL, 0x600000000000ULL, MappingDesc::APP, "app-2"},
     {0x600000000000ULL, 0x610000000000ULL, MappingDesc::ORIGIN, "origin-1"},
     {0x610000000000ULL, 0x700000000000ULL, MappingDesc::INVALID, "invalid"},
-    {0x700000000000ULL, 0x800000000000ULL, MappingDesc::APP, "app-3"}};
+    {0x700000000000ULL, 0x740000000000ULL, MappingDesc::ALLOCATOR, "allocator"},
----------------
thurstond wrote:

Currently, the kernel might randomly map the app into the same region that the allocator expects (this isn't a problem with low-entropy ASLR, because it never maps into the bottom part of the app region, which is where the allocator typically lives). We therefore need to enforce that the APP and ALLOCATOR regions are disjoint.

https://github.com/llvm/llvm-project/pull/85142


More information about the llvm-commits mailing list