Home
last modified time | relevance | path

Searched refs:MTE_GRANULE_SIZE (Results 1 – 9 of 9) sorted by relevance

/xnu-12377.61.12/tests/
H A Darm_mte_mach_msg.c52 …h_vm_size_t sz_rounded = (VIRTUAL_COPY_SZ + (MTE_GRANULE_SIZE - 1)) & (unsigned)~((signed)(MTE_GRA…
53 static const mach_msg_size_t memory_size_options[] = { MTE_GRANULE_SIZE, MTE_GRANULE_SIZE*4, KERNEL…
155 for (uint64_t i = 0; i < sz_rounded / MTE_GRANULE_SIZE; ++i) { in tag_pointer()
156 uintptr_t cur_ptr = (uintptr_t)tagged_ptr + i * MTE_GRANULE_SIZE; in tag_pointer()
214 send_ool_memory_helper(ptr, FALSE, MACH_MSG_VIRTUAL_COPY, MTE_GRANULE_SIZE, true, true); in ool_memory_assertions()
215 send_ool_memory_helper(ptr, FALSE, MACH_MSG_VIRTUAL_COPY, MTE_GRANULE_SIZE * 4, true, true); in ool_memory_assertions()
224 send_ool_memory_helper(ptr, FALSE, MACH_MSG_PHYSICAL_COPY, MTE_GRANULE_SIZE, true, true); in ool_memory_assertions()
225 send_ool_memory_helper(ptr, FALSE, MACH_MSG_PHYSICAL_COPY, MTE_GRANULE_SIZE * 4, true, true); in ool_memory_assertions()
234 send_ool_memory_helper(ptr, TRUE, MACH_MSG_VIRTUAL_COPY, MTE_GRANULE_SIZE, true, false); in ool_memory_assertions()
235 send_ool_memory_helper(ptr, TRUE, MACH_MSG_VIRTUAL_COPY, MTE_GRANULE_SIZE * 4, true, false); in ool_memory_assertions()
[all …]
H A Darm_mte_knobs_policies.c50 static const size_t ALLOC_SIZE = MTE_GRANULE_SIZE * 2; in tag_violate_template()
86 void *next_granule_ptr = orig_tagged_ptr + MTE_GRANULE_SIZE; in tag_violate_template()
92 random_tagged_ptr[MTE_GRANULE_SIZE] = '!'; in tag_violate_template()
96 …T_ASSERT_EQ_CHAR(random_tagged_ptr[MTE_GRANULE_SIZE], '!', "faulting instruction wasn't re-issued … in tag_violate_template()
99 __arm_mte_set_tag(orig_tagged_ptr + MTE_GRANULE_SIZE); in tag_violate_template()
H A Darm_mte.c92 static const size_t ALLOC_SIZE = MTE_GRANULE_SIZE * 2; in do_mte_tag_check()
139 void *next_granule_ptr = orig_tagged_ptr + MTE_GRANULE_SIZE; in do_mte_tag_check()
146 random_tagged_ptr[MTE_GRANULE_SIZE] = '!'; in do_mte_tag_check()
159 __arm_mte_set_tag(orig_tagged_ptr + MTE_GRANULE_SIZE); in do_mte_tag_check()
207 kern_return_t kr = vm_allocate(mach_task_self(), &address, MTE_GRANULE_SIZE, VM_FLAGS_ANYWHERE);
222 vm_deallocate(mach_task_self(), address, MTE_GRANULE_SIZE);
229 …static_assert(MAXTHREADNAMESIZE >= MTE_GRANULE_SIZE * 2, "kern.threadname parameter can span multi… in run_mte_copyio_tests()
232 const size_t threadname_len = MTE_GRANULE_SIZE * 2; in run_mte_copyio_tests()
243 char *next_granule_ptr = tagged_ptr + MTE_GRANULE_SIZE; in run_mte_copyio_tests()
444 const vm_size_t NUM_GRANULES = vm_alloc_sz / MTE_GRANULE_SIZE; in do_fork_test()
[all …]
H A Darm_mte_debugger_helper.c100 for (vm_size_t i = 0; i < ALLOC_SIZE; i += MTE_GRANULE_SIZE) { in main()
H A Darm_mte_utilities.h50 #define MTE_GRANULE_SIZE 16 macro
H A Darm_mte_utilities.c327 T_QUIET; T_ASSERT_EQ(size % MTE_GRANULE_SIZE, 0ULL, "can't tag part of an MTE granule"); in allocate_and_tag_range()
341 for (mach_vm_size_t offset = 0; offset < size; offset += MTE_GRANULE_SIZE) { in allocate_and_tag_range()
H A Darm_mte_alias_restriction.c288 for (mach_vm_size_t offset = halfway; offset < alloc_size; offset += MTE_GRANULE_SIZE) {
/xnu-12377.61.12/osfmk/arm64/
H A Dplatform_tests.c2207 const size_t MTE_GRANULE_SIZE = 16; in mte_test() local
2294 void *next_granule_ptr = orig_tagged_ptr + MTE_GRANULE_SIZE; in mte_test()
2300 ml_expect_fault_begin(mte_test_fault_handler, (uintptr_t)&random_tagged_ptr[MTE_GRANULE_SIZE]); in mte_test()
2301 random_tagged_ptr[MTE_GRANULE_SIZE] = '!'; in mte_test()
/xnu-12377.61.12/osfmk/vm/
H A Dvm_tests.c1866 static unsigned int const MTE_GRANULE_SIZE = 16; variable
2022 result = copyout((void *)&c, (user_addr_t)(canonical_addr + MTE_GRANULE_SIZE), sizeof(c)); in vm_page_relocate_test()
2023 T_EXPECT_EQ_INT(result, 0, "copyout %c to 0x%llx", c, (canonical_addr + MTE_GRANULE_SIZE)); in vm_page_relocate_test()