Home
last modified time | relevance | path

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

/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_checks.h130 DCHECK(IsAligned(ptr, kShadowAlignment)); in ShortTagSize()
133 return kShadowAlignment; in ShortTagSize()
134 if (!mem_tag || mem_tag >= kShadowAlignment) in ShortTagSize()
136 if (*(u8 *)(ptr | (kShadowAlignment - 1)) != ptr_tag) in ShortTagSize()
146 if (mem_tag >= kShadowAlignment) in PossiblyShortTagMatches()
148 if ((ptr & (kShadowAlignment - 1)) + sz > mem_tag) in PossiblyShortTagMatches()
150 return *(u8 *)(ptr | (kShadowAlignment - 1)) == ptr_tag; in PossiblyShortTagMatches()
182 uptr tail_sz = end & (kShadowAlignment - 1); in CheckAddressSized()
185 *shadow_last, end & ~(kShadowAlignment - 1), tail_sz))) { in CheckAddressSized()
H A Dhwasan_report.cpp353 if (*tag_ptr == 0 || *tag_ptr > kShadowAlignment - 1) in TagsEqual()
356 tag_t inline_tag = *reinterpret_cast<tag_t *>(mem + kShadowAlignment - 1); in TagsEqual()
441 kShadowAlignment); in PrintTagsAroundAddr()
451 kShadowAlignment); in PrintTagsAroundAddr()
455 if (tag >= 1 && tag <= kShadowAlignment) { in PrintTagsAroundAddr()
573 if (mem_tag && mem_tag < kShadowAlignment) { in FindMismatchOffset()
575 ~(kShadowAlignment - 1)); in FindMismatchOffset()
578 u8 in_granule_offset = (untagged_addr + offset) & (kShadowAlignment - 1); in FindMismatchOffset()
579 tag_t short_tag = granule_ptr[kShadowAlignment - 1]; in FindMismatchOffset()
608 if (1 <= result.tags[i] && result.tags[i] <= kShadowAlignment && in CopyShadow()
[all …]
H A Dhwasan_allocator.cpp47 alignas(16) static u8 tail_magic[kShadowAlignment - 1];
178 uptr new_size = RoundUpTo(size, kShadowAlignment); in TaggedSize()
202 alignment = Max(alignment, kShadowAlignment); in HwasanAllocate()
242 uptr full_granule_size = RoundDownTo(tag_size, kShadowAlignment); in HwasanAllocate()
246 TagMemoryAligned((uptr)short_granule, kShadowAlignment, in HwasanAllocate()
247 tag_size % kShadowAlignment); in HwasanAllocate()
248 short_granule[kShadowAlignment - 1] = tag; in HwasanAllocate()
299 RoundDownTo(reinterpret_cast<uptr>(untagged_ptr), kShadowAlignment)); in HwasanDeallocate()
321 CHECK_LT(tail_size, kShadowAlignment); in HwasanDeallocate()
355 UNLIKELY((tag < kShadowAlignment || tag == pointer_tag) && tag != 0)); in HwasanDeallocate()
[all …]
H A Dhwasan_poisoning.cpp23 uptr start = RoundDownTo(p, kShadowAlignment); in TagMemory()
24 uptr end = RoundUpTo(p + size, kShadowAlignment); in TagMemory()
H A Dhwasan_fuchsia.cpp159 CHECK(IsAligned(p, kShadowAlignment)); in TagMemoryAligned()
160 CHECK(IsAligned(size, kShadowAlignment)); in TagMemoryAligned()
H A Dhwasan_mapping.h38 constexpr uptr kShadowAlignment = 1ULL << kShadowScale; variable
H A Dhwasan.cpp439 if (mem_tag && mem_tag < kShadowAlignment) in __hwasan_print_shadow()
441 *reinterpret_cast<tag_t *>(granule_addr + kShadowAlignment - 1)); in __hwasan_print_shadow()
465 uptr tail_sz = end & (kShadowAlignment - 1); in __hwasan_test_shadow()
470 ShortTagSize(*(tag_t *)shadow_last, end & ~(kShadowAlignment - 1)); in __hwasan_test_shadow()
H A Dhwasan_linux.cpp511 CHECK(IsAligned(p, kShadowAlignment)); in TagMemoryAligned()
512 CHECK(IsAligned(size, kShadowAlignment)); in TagMemoryAligned()