reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

projects/compiler-rt/lib/asan/asan_allocator.cpp
  465     if (*(u8 *)MEM_TO_SHADOW((uptr)allocated) == 0 && CanPoisonMemory()) {
projects/compiler-rt/lib/asan/asan_debugging.cpp
  145     *shadow_offset = SHADOW_OFFSET;
projects/compiler-rt/lib/asan/asan_linux.cpp
  124   uptr shadow_size = RoundUpTo(kHighShadowEnd, granularity);
projects/compiler-rt/lib/asan/asan_mapping.h
  309   return a <= kLowMemEnd;
  314   return a >= kLowShadowBeg && a <= kLowShadowEnd;
  314   return a >= kLowShadowBeg && a <= kLowShadowEnd;
  324   return kMidMemBeg && a >= kMidShadowBeg && a <= kMidShadowEnd;
  324   return kMidMemBeg && a >= kMidShadowBeg && a <= kMidShadowEnd;
  329   return kHighMemBeg && a >= kHighMemBeg && a <= kHighMemEnd;
  329   return kHighMemBeg && a >= kHighMemBeg && a <= kHighMemEnd;
  334   return kHighMemBeg && a >= kHighShadowBeg && a <= kHighShadowEnd;
  334   return kHighMemBeg && a >= kHighShadowBeg && a <= kHighShadowEnd;
  334   return kHighMemBeg && a >= kHighShadowBeg && a <= kHighShadowEnd;
  340     if (a <= kShadowGapEnd)
  341       return SHADOW_OFFSET == 0 || a >= kShadowGapBeg;
  341       return SHADOW_OFFSET == 0 || a >= kShadowGapBeg;
  342     return (a >= kShadowGap2Beg && a <= kShadowGap2End) ||
  343            (a >= kShadowGap3Beg && a <= kShadowGap3End);
  347   if (SHADOW_OFFSET == 0)
  348     return a <= kShadowGapEnd;
  349   return a >= kShadowGapBeg && a <= kShadowGapEnd;
  349   return a >= kShadowGapBeg && a <= kShadowGapEnd;
  367   return MEM_TO_SHADOW(p);
  385   u8 *shadow_address = (u8*)MEM_TO_SHADOW(a);
projects/compiler-rt/lib/asan/asan_poisoning.cpp
  269   uptr s = MEM_TO_SHADOW(p);
  277   uptr s = MEM_TO_SHADOW(reinterpret_cast<uptr>(p));
projects/compiler-rt/lib/asan/asan_poisoning.h
   46   uptr shadow_beg = MEM_TO_SHADOW(aligned_beg);
   47   uptr shadow_end = MEM_TO_SHADOW(
   83   u8 *shadow = (u8*)MEM_TO_SHADOW(aligned_addr);
projects/compiler-rt/lib/asan/asan_rtl.cpp
   55       UnmapOrDie((void*)kLowShadowBeg, kMidMemBeg - kLowShadowBeg);
   55       UnmapOrDie((void*)kLowShadowBeg, kMidMemBeg - kLowShadowBeg);
   56       UnmapOrDie((void*)kMidMemEnd, kHighShadowEnd - kMidMemEnd);
   58       if (kHighShadowEnd)
   59         UnmapOrDie((void*)kLowShadowBeg, kHighShadowEnd - kLowShadowBeg);
   59         UnmapOrDie((void*)kLowShadowBeg, kHighShadowEnd - kLowShadowBeg);
   59         UnmapOrDie((void*)kLowShadowBeg, kHighShadowEnd - kLowShadowBeg);
  324   CHECK_EQ((kHighMemBeg % GetMmapGranularity()), 0);
  329   if (kHighMemBeg) {
  331            (void*)kHighMemBeg, (void*)kHighMemEnd);
  333            (void*)kHighShadowBeg, (void*)kHighShadowEnd);
  333            (void*)kHighShadowBeg, (void*)kHighShadowEnd);
  337            (void*)kShadowGap3Beg, (void*)kShadowGap3End);
  341            (void*)kShadowGap2Beg, (void*)kShadowGap2End);
  343            (void*)kMidShadowBeg, (void*)kMidShadowEnd);
  343            (void*)kMidShadowBeg, (void*)kMidShadowEnd);
  346          (void*)kShadowGapBeg, (void*)kShadowGapEnd);
  346          (void*)kShadowGapBeg, (void*)kShadowGapEnd);
  347   if (kLowShadowBeg) {
  349            (void*)kLowShadowBeg, (void*)kLowShadowEnd);
  349            (void*)kLowShadowBeg, (void*)kLowShadowEnd);
  351            (void*)kLowMemBeg, (void*)kLowMemEnd);
  354          (void*)MEM_TO_SHADOW(kLowShadowBeg),
  354          (void*)MEM_TO_SHADOW(kLowShadowBeg),
  355          (void*)MEM_TO_SHADOW(kLowShadowEnd));
  355          (void*)MEM_TO_SHADOW(kLowShadowEnd));
  356   if (kHighMemBeg) {
  358            (void*)MEM_TO_SHADOW(kHighShadowBeg),
  358            (void*)MEM_TO_SHADOW(kHighShadowBeg),
  359            (void*)MEM_TO_SHADOW(kHighShadowEnd));
  359            (void*)MEM_TO_SHADOW(kHighShadowEnd));
  363            (void*)MEM_TO_SHADOW(kMidShadowBeg),
  363            (void*)MEM_TO_SHADOW(kMidShadowBeg),
  364            (void*)MEM_TO_SHADOW(kMidShadowEnd));
  364            (void*)MEM_TO_SHADOW(kMidShadowEnd));
  377   Printf("SHADOW_OFFSET: 0x%zx\n", (uptr)SHADOW_OFFSET);
  380     CHECK(kMidShadowBeg > kLowShadowEnd &&
  380     CHECK(kMidShadowBeg > kLowShadowEnd &&
  381           kMidMemBeg > kMidShadowEnd &&
  382           kHighShadowBeg > kMidMemEnd);
projects/compiler-rt/lib/asan/asan_shadow_setup.cpp
   47     uptr GapShadowBeg = RoundDownTo(MEM_TO_SHADOW(addr), GetPageSizeCached());
   49         RoundUpTo(MEM_TO_SHADOW(addr + size), GetPageSizeCached()) - 1;
   95   uptr shadow_start = kLowShadowBeg;
  103     CHECK_EQ(0, kLowShadowBeg);
  110   if (kLowShadowBeg) shadow_start -= GetMmapGranularity();
  114         MemoryRangeIsAvailable(shadow_start, kHighShadowEnd);
  119     kMidMemBeg = kLowMemEnd < 0x3000000000ULL ? 0x3000000000ULL : 0;
  120     kMidMemEnd = kLowMemEnd < 0x3000000000ULL ? 0x4fffffffffULL : 0;
  128     if (kLowShadowBeg)
  129       ReserveShadowMemoryRange(shadow_start, kLowShadowEnd, "low shadow");
  131     ReserveShadowMemoryRange(kHighShadowBeg, kHighShadowEnd, "high shadow");
  131     ReserveShadowMemoryRange(kHighShadowBeg, kHighShadowEnd, "high shadow");
  133     ProtectGap(kShadowGapBeg, kShadowGapEnd - kShadowGapBeg + 1);
  133     ProtectGap(kShadowGapBeg, kShadowGapEnd - kShadowGapBeg + 1);
  133     ProtectGap(kShadowGapBeg, kShadowGapEnd - kShadowGapBeg + 1);
  134     CHECK_EQ(kShadowGapEnd, kHighShadowBeg - 1);
  134     CHECK_EQ(kShadowGapEnd, kHighShadowBeg - 1);
  137              MemoryRangeIsAvailable(kMidMemEnd + 1, kHighShadowEnd)) {
  138     CHECK(kLowShadowBeg != kLowShadowEnd);
  138     CHECK(kLowShadowBeg != kLowShadowEnd);
  140     ReserveShadowMemoryRange(shadow_start, kLowShadowEnd, "low shadow");
  142     ReserveShadowMemoryRange(kMidShadowBeg, kMidShadowEnd, "mid shadow");
  142     ReserveShadowMemoryRange(kMidShadowBeg, kMidShadowEnd, "mid shadow");
  144     ReserveShadowMemoryRange(kHighShadowBeg, kHighShadowEnd, "high shadow");
  144     ReserveShadowMemoryRange(kHighShadowBeg, kHighShadowEnd, "high shadow");
  146     ProtectGap(kShadowGapBeg, kShadowGapEnd - kShadowGapBeg + 1);
  146     ProtectGap(kShadowGapBeg, kShadowGapEnd - kShadowGapBeg + 1);
  146     ProtectGap(kShadowGapBeg, kShadowGapEnd - kShadowGapBeg + 1);
  147     ProtectGap(kShadowGap2Beg, kShadowGap2End - kShadowGap2Beg + 1);
  147     ProtectGap(kShadowGap2Beg, kShadowGap2End - kShadowGap2Beg + 1);
  148     ProtectGap(kShadowGap3Beg, kShadowGap3End - kShadowGap3Beg + 1);
  154            shadow_start, kHighShadowEnd);