From: Jianzhou Zhao Date: Fri, 26 Feb 2021 23:34:02 +0000 (+0000) Subject: [msan] Use non-transparent-huge-page at SetShadow X-Git-Tag: llvmorg-14-init~13890 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0dc885d29af8f2bd2434047937c2ba65c7c7adb;p=platform%2Fupstream%2Fllvm.git [msan] Use non-transparent-huge-page at SetShadow This prevents from getting THP ranges more and more. Did not see any issues in practice, just found this by code review. Reviewed By: eugenis, vitalybuka Differential Revision: https://reviews.llvm.org/D97593 --- diff --git a/compiler-rt/lib/msan/msan_poisoning.cpp b/compiler-rt/lib/msan/msan_poisoning.cpp index a92b056..1589239 100644 --- a/compiler-rt/lib/msan/msan_poisoning.cpp +++ b/compiler-rt/lib/msan/msan_poisoning.cpp @@ -213,7 +213,7 @@ void SetShadow(const void *ptr, uptr size, u8 value) { if (page_end != shadow_end) { REAL(memset)((void *)page_end, 0, shadow_end - page_end); } - if (!MmapFixedNoReserve(page_beg, page_end - page_beg)) + if (!MmapFixedSuperNoReserve(page_beg, page_end - page_beg)) Die(); } }