Home
last modified time | relevance | path

Searched refs:MEM_TO_SHADOW (Results 1 – 11 of 11) sorted by relevance

/external/compiler-rt/lib/asan/
Dasan_mapping.h146 #define MEM_TO_SHADOW(mem) (((mem) >> SHADOW_SCALE) + (SHADOW_OFFSET)) macro
153 #define kLowShadowEnd MEM_TO_SHADOW(kLowMemEnd)
155 #define kHighMemBeg (MEM_TO_SHADOW(kHighMemEnd) + 1)
157 #define kHighShadowBeg MEM_TO_SHADOW(kHighMemBeg)
158 #define kHighShadowEnd MEM_TO_SHADOW(kHighMemEnd)
160 # define kMidShadowBeg MEM_TO_SHADOW(kMidMemBeg)
161 # define kMidShadowEnd MEM_TO_SHADOW(kMidMemEnd)
232 return MEM_TO_SHADOW(p); in MemToShadow()
273 u8 *shadow_address = (u8*)MEM_TO_SHADOW(a); in AddressIsPoisoned()
Dasan_poisoning.h42 uptr shadow_beg = MEM_TO_SHADOW(aligned_beg); in FastPoisonShadow()
43 uptr shadow_end = MEM_TO_SHADOW( in FastPoisonShadow()
76 u8 *shadow = (u8*)MEM_TO_SHADOW(aligned_addr); in FastPoisonShadowPartialRightRedzone()
Dasan_rtl.cc155 uptr sp = MEM_TO_SHADOW(addr); \ in ASAN_REPORT_ERROR_N()
334 (void*)MEM_TO_SHADOW(kLowShadowBeg), in PrintAddressSpaceLayout()
335 (void*)MEM_TO_SHADOW(kLowShadowEnd), in PrintAddressSpaceLayout()
336 (void*)MEM_TO_SHADOW(kHighShadowBeg), in PrintAddressSpaceLayout()
337 (void*)MEM_TO_SHADOW(kHighShadowEnd)); in PrintAddressSpaceLayout()
340 (void*)MEM_TO_SHADOW(kMidShadowBeg), in PrintAddressSpaceLayout()
341 (void*)MEM_TO_SHADOW(kMidShadowEnd)); in PrintAddressSpaceLayout()
Dasan_poisoning.cc266 uptr s = MEM_TO_SHADOW(p); in __asan_poison_cxx_array_cookie()
274 uptr s = MEM_TO_SHADOW(reinterpret_cast<uptr>(p)); in __asan_load_cxx_array_cookie()
Dasan_allocator.cc379 if (*(u8 *)MEM_TO_SHADOW((uptr)allocated) == 0 && CanPoisonMemory()) { in Allocate()
/external/compiler-rt/lib/msan/
Dmsan_poisoning.cc27 unsigned char *s = (unsigned char *)MEM_TO_SHADOW(addr); in GetOriginIfPoisoned()
35 uptr dst_s = MEM_TO_SHADOW(addr); in SetOriginIfPoisoned()
78 u32 *src_s = (u32 *)MEM_TO_SHADOW(s); in CopyOrigin()
103 REAL(memmove)((void *)MEM_TO_SHADOW((uptr)dst), in MoveShadowAndOrigin()
104 (void *)MEM_TO_SHADOW((uptr)src), size); in MoveShadowAndOrigin()
112 REAL(memcpy)((void *)MEM_TO_SHADOW((uptr)dst), in CopyShadowAndOrigin()
113 (void *)MEM_TO_SHADOW((uptr)src), size); in CopyShadowAndOrigin()
124 uptr shadow_beg = MEM_TO_SHADOW(ptr); in SetShadow()
125 uptr shadow_end = MEM_TO_SHADOW((uptr)ptr + size); in SetShadow()
Dmsan_linux.cc80 CHECK(MEM_IS_SHADOW(MEM_TO_SHADOW(addr))); in CheckMemoryLayoutSanity()
82 CHECK_EQ(MEM_TO_ORIGIN(addr), SHADOW_TO_ORIGIN(MEM_TO_SHADOW(addr))); in CheckMemoryLayoutSanity()
85 CHECK(MEM_IS_SHADOW(MEM_TO_SHADOW(addr))); in CheckMemoryLayoutSanity()
87 CHECK_EQ(MEM_TO_ORIGIN(addr), SHADOW_TO_ORIGIN(MEM_TO_SHADOW(addr))); in CheckMemoryLayoutSanity()
90 CHECK(MEM_IS_SHADOW(MEM_TO_SHADOW(addr))); in CheckMemoryLayoutSanity()
92 CHECK_EQ(MEM_TO_ORIGIN(addr), SHADOW_TO_ORIGIN(MEM_TO_SHADOW(addr))); in CheckMemoryLayoutSanity()
Dmsan.cc439 unsigned char *s = (unsigned char*)MEM_TO_SHADOW(x); in __msan_dump_shadow()
452 unsigned char *s = (unsigned char *)MEM_TO_SHADOW((uptr)x); in __msan_test_shadow()
490 internal_memcpy((void*)MEM_TO_SHADOW((uptr)data), shadow, size); in __msan_partial_poison()
558 __msan_retval_tls[0] = *(uu16 *)MEM_TO_SHADOW((uptr)p); in __sanitizer_unaligned_load16()
564 __msan_retval_tls[0] = *(uu32 *)MEM_TO_SHADOW((uptr)p); in __sanitizer_unaligned_load32()
570 __msan_retval_tls[0] = *(uu64 *)MEM_TO_SHADOW((uptr)p); in __sanitizer_unaligned_load64()
577 *(uu16 *)MEM_TO_SHADOW((uptr)p) = s; in __sanitizer_unaligned_store16()
585 *(uu32 *)MEM_TO_SHADOW((uptr)p) = s; in __sanitizer_unaligned_store32()
593 *(uu64 *)MEM_TO_SHADOW((uptr)p) = s; in __sanitizer_unaligned_store64()
Dmsan.h47 #define MEM_TO_SHADOW(mem) (((uptr)(mem)) & ~0x4000000000ULL) macro
68 #define MEM_TO_SHADOW(mem) (LINEARIZE_MEM((mem)) + 0x100000000000ULL) macro
82 #define MEM_TO_SHADOW(mem) (((uptr)(mem)) & ~0x400000000000ULL) macro
91 #define MEM_TO_ORIGIN(mem) (SHADOW_TO_ORIGIN(MEM_TO_SHADOW((mem))))
Dmsan_allocator.cc36 FlushUnneededShadowMemory(MEM_TO_SHADOW(p), size); in OnUnmap()
Dmsan_report.cc186 uptr start = MEM_TO_SHADOW(x); in DescribeMemoryRange()