Home
last modified time | relevance | path

Searched refs:kShadowAlignment (Results 1 – 5 of 5) sorted by relevance

/external/llvm-project/compiler-rt/lib/hwasan/
Dhwasan_poisoning.cpp23 CHECK(IsAligned(p, kShadowAlignment)); in TagMemoryAligned()
24 CHECK(IsAligned(size, kShadowAlignment)); in TagMemoryAligned()
47 uptr start = RoundDownTo(p, kShadowAlignment); in TagMemory()
48 uptr end = RoundUpTo(p + size, kShadowAlignment); in TagMemory()
Dhwasan_allocator.cpp42 static ALIGNED(16) u8 tail_magic[kShadowAlignment - 1];
51 uptr tail_size = requested_size % kShadowAlignment; in AlignRight()
53 return addr + kShadowAlignment - tail_size; in AlignRight()
98 uptr new_size = RoundUpTo(size, kShadowAlignment); in TaggedSize()
114 alignment = Max(alignment, kShadowAlignment); in HwasanAllocate()
156 uptr full_granule_size = RoundDownTo(tag_size, kShadowAlignment); in HwasanAllocate()
162 TagMemoryAligned((uptr)short_granule, kShadowAlignment, in HwasanAllocate()
163 tag_size % kShadowAlignment); in HwasanAllocate()
164 short_granule[kShadowAlignment - 1] = tag; in HwasanAllocate()
192 RoundDownTo(reinterpret_cast<uptr>(untagged_ptr), kShadowAlignment)); in HwasanDeallocate()
[all …]
Dhwasan_checks.h69 if (mem_tag >= kShadowAlignment) in PossiblyShortTagMatches()
71 if ((ptr & (kShadowAlignment - 1)) + sz > mem_tag) in PossiblyShortTagMatches()
76 return *(u8 *)(ptr | (kShadowAlignment - 1)) == ptr_tag; in PossiblyShortTagMatches()
114 *shadow_last, end & ~(kShadowAlignment - 1), tail_sz))) { in CheckAddressSized()
Dhwasan_report.cpp255 if (*tag_ptr == 0 || *tag_ptr > kShadowAlignment - 1) in TagsEqual()
258 tag_t inline_tag = *reinterpret_cast<tag_t *>(mem + kShadowAlignment - 1); in TagsEqual()
479 "bytes):\n", kShadowAlignment); in PrintTagsAroundAddr()
487 kShadowAlignment); in PrintTagsAroundAddr()
489 if (*tag >= 1 && *tag <= kShadowAlignment) { in PrintTagsAroundAddr()
492 *reinterpret_cast<u8 *>(granule_addr + kShadowAlignment - 1)); in PrintTagsAroundAddr()
532 uptr tail_size = kShadowAlignment - (orig_size % kShadowAlignment); in ReportTailOverwritten()
552 CHECK_LT(tail_size, kShadowAlignment); in ReportTailOverwritten()
555 for (uptr i = 0; i < kShadowAlignment - tail_size; i++) in ReportTailOverwritten()
561 for (uptr i = 0; i < kShadowAlignment - tail_size; i++) in ReportTailOverwritten()
[all …]
Dhwasan_mapping.h38 constexpr uptr kShadowAlignment = 1ULL << kShadowScale; variable