/tools/testing/selftests/arm64/mte/ |
D | check_buffer_fill.c | 28 static int check_buffer_by_byte(int mem_type, int mode) in check_buffer_by_byte() argument 38 ptr = (char *)mte_allocate_memory(sizes[i], mem_type, 0, true); in check_buffer_by_byte() 39 if (check_allocated_memory(ptr, sizes[i], mem_type, true) != KSFT_PASS) in check_buffer_by_byte() 52 mte_free_memory((void *)ptr, sizes[i], mem_type, true); in check_buffer_by_byte() 63 static int check_buffer_underflow_by_byte(int mem_type, int mode, in check_buffer_underflow_by_byte() argument 74 ptr = (char *)mte_allocate_memory_tag_range(sizes[i], mem_type, 0, in check_buffer_underflow_by_byte() 76 if (check_allocated_memory_range(ptr, sizes[i], mem_type, in check_buffer_underflow_by_byte() 151 mte_free_memory_tag_range((void *)ptr, sizes[i], mem_type, underflow_range, 0); in check_buffer_underflow_by_byte() 158 static int check_buffer_overflow_by_byte(int mem_type, int mode, in check_buffer_overflow_by_byte() argument 170 ptr = (char *)mte_allocate_memory_tag_range(sizes[i], mem_type, 0, in check_buffer_overflow_by_byte() [all …]
|
D | check_tags_inclusion.c | 43 static int check_single_included_tags(int mem_type, int mode) in check_single_included_tags() argument 48 ptr = (char *)mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_single_included_tags() 50 mem_type, false) != KSFT_PASS) in check_single_included_tags() 69 mte_free_memory_tag_range((void *)ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_single_included_tags() 73 static int check_multiple_included_tags(int mem_type, int mode) in check_multiple_included_tags() argument 79 ptr = (char *)mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_multiple_included_tags() 81 mem_type, false) != KSFT_PASS) in check_multiple_included_tags() 101 mte_free_memory_tag_range((void *)ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_multiple_included_tags() 105 static int check_all_included_tags(int mem_type, int mode) in check_all_included_tags() argument 110 ptr = (char *)mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_all_included_tags() [all …]
|
D | mte_common_util.c | 119 static void *__mte_allocate_memory_range(size_t size, int mem_type, int mapping, in __mte_allocate_memory_range() argument 127 if (mem_type != USE_MALLOC && mem_type != USE_MMAP && in __mte_allocate_memory_range() 128 mem_type != USE_MPROTECT) { in __mte_allocate_memory_range() 132 if (mem_type == USE_MALLOC) in __mte_allocate_memory_range() 136 if (mem_type == USE_MMAP) in __mte_allocate_memory_range() 149 if (mem_type == USE_MPROTECT) { in __mte_allocate_memory_range() 161 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping, in mte_allocate_memory_tag_range() argument 164 return __mte_allocate_memory_range(size, mem_type, mapping, range_before, in mte_allocate_memory_tag_range() 168 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags) in mte_allocate_memory() argument 170 return __mte_allocate_memory_range(size, mem_type, mapping, 0, 0, tags, -1); in mte_allocate_memory() [all …]
|
D | mte_common_util.h | 45 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags); 46 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping, 48 void *mte_allocate_file_memory(size_t size, int mem_type, int mapping, 50 void *mte_allocate_file_memory_tag_range(size_t size, int mem_type, int mapping, 52 void mte_free_memory(void *ptr, size_t size, int mem_type, bool tags); 53 void mte_free_memory_tag_range(void *ptr, size_t size, int mem_type, 85 int mem_type, bool tags) in check_allocated_memory() argument 94 mte_free_memory((void *)ptr, size, mem_type, false); in check_allocated_memory() 101 static inline int check_allocated_memory_range(void *ptr, size_t size, int mem_type, in check_allocated_memory_range() argument 111 mte_free_memory_tag_range((void *)ptr, size, mem_type, range_before, in check_allocated_memory_range()
|
D | check_mmap_options.c | 60 static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_anonymous_memory_mapping() argument 70 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping() 71 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_anonymous_memory_mapping() 85 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_anonymous_memory_mapping() 92 static int check_file_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_file_memory_mapping() argument 106 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping() 107 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_file_memory_mapping() 131 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument 141 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag() 143 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_clear_prot_mte_flag() [all …]
|
D | check_child_memory.c | 84 static int check_child_memory_mapping(int mem_type, int mode, int mapping) in check_child_memory_mapping() argument 93 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_child_memory_mapping() 95 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_child_memory_mapping() 99 mte_free_memory_tag_range((void *)ptr, sizes[run], mem_type, UNDERFLOW, OVERFLOW); in check_child_memory_mapping() 106 static int check_child_file_mapping(int mem_type, int mode, int mapping) in check_child_file_mapping() argument 119 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_child_file_mapping() 120 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_child_file_mapping()
|
D | check_user_mem.c | 22 static int check_usermem_access_fault(int mem_type, int mode, int mapping) in check_usermem_access_fault() argument 39 ptr = mte_allocate_memory(len, mem_type, mapping, true); in check_usermem_access_fault() 40 if (check_allocated_memory(ptr, len, mem_type, true) != KSFT_PASS) { in check_usermem_access_fault() 79 mte_free_memory((void *)ptr, len, mem_type, true); in check_usermem_access_fault()
|
D | check_ksm_options.c | 98 static int check_madvise_options(int mem_type, int mode, int mapping) in check_madvise_options() argument 110 ptr = mte_allocate_memory(TEST_UNIT * page_sz, mem_type, mapping, true); in check_madvise_options() 111 if (check_allocated_memory(ptr, TEST_UNIT * page_sz, mem_type, false) != KSFT_PASS) in check_madvise_options() 127 mte_free_memory(ptr, TEST_UNIT * page_sz, mem_type, true); in check_madvise_options()
|
/tools/perf/scripts/python/ |
D | mem-phys-addr.py | 49 for mem_type, count in sorted(load_mem_type_cnt.most_common(), \ 52 (mem_type, count, 100 * count / total),
|