Lines Matching +full:sync +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0
29 1, 537, 989, 1269, MT_GRANULE_SIZE - 1, MT_GRANULE_SIZE,
30 /* page size - 1*/ 0, /* page_size */ 0, /* page size + 1 */ 0
33 static int check_mte_memory(char *ptr, int size, int mode, int tag_check) in check_mte_memory() argument
35 mte_initialize_current_context(mode, (uintptr_t)ptr, size); in check_mte_memory()
41 mte_initialize_current_context(mode, (uintptr_t)ptr, -UNDERFLOW); in check_mte_memory()
42 memset(ptr - UNDERFLOW, '2', UNDERFLOW); in check_mte_memory()
49 mte_initialize_current_context(mode, (uintptr_t)ptr, size + OVERFLOW); in check_mte_memory()
60 static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_anonymous_memory_mapping() argument
66 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_anonymous_memory_mapping()
74 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[run]); in check_anonymous_memory_mapping()
82 result = check_mte_memory(ptr, sizes[run], mode, tag_check); in check_anonymous_memory_mapping()
91 static int check_file_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_file_memory_mapping() argument
98 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_file_memory_mapping()
101 if (fd == -1) in check_file_memory_mapping()
111 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[run]); in check_file_memory_mapping()
120 result = check_mte_memory(ptr, sizes[run], mode, tag_check); in check_file_memory_mapping()
130 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument
137 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_clear_prot_mte_flag()
145 map_ptr = ptr - UNDERFLOW; in check_clear_prot_mte_flag()
153 result = check_mte_memory(ptr, sizes[run], mode, TAG_CHECK_ON); in check_clear_prot_mte_flag()
159 if (fd == -1) in check_clear_prot_mte_flag()
168 map_ptr = ptr - UNDERFLOW; in check_clear_prot_mte_flag()
177 result = check_mte_memory(ptr, sizes[run], mode, TAG_CHECK_ON); in check_clear_prot_mte_flag()
199 sizes[item - 3] = page_size - 1; in main()
200 sizes[item - 2] = page_size; in main()
201 sizes[item - 1] = page_size + 1; in main()
213 "Check anonymous memory with private mapping, sync error mode, mmap memory and tag check off\n"); in main()
215 …"Check file memory with private mapping, sync error mode, mmap/mprotect memory and tag check off\n… in main()
219 "Check anonymous memory with private mapping, no error mode, mmap memory and tag check off\n"); in main()
221 "Check file memory with private mapping, no error mode, mmap/mprotect memory and tag check off\n"); in main()
224 "Check anonymous memory with private mapping, sync error mode, mmap memory and tag check on\n"); in main()
226 …"Check anonymous memory with private mapping, sync error mode, mmap/mprotect memory and tag check … in main()
228 "Check anonymous memory with shared mapping, sync error mode, mmap memory and tag check on\n"); in main()
230 …"Check anonymous memory with shared mapping, sync error mode, mmap/mprotect memory and tag check o… in main()
232 "Check anonymous memory with private mapping, async error mode, mmap memory and tag check on\n"); in main()
234 …"Check anonymous memory with private mapping, async error mode, mmap/mprotect memory and tag check… in main()
236 "Check anonymous memory with shared mapping, async error mode, mmap memory and tag check on\n"); in main()
238 …"Check anonymous memory with shared mapping, async error mode, mmap/mprotect memory and tag check … in main()
241 "Check file memory with private mapping, sync error mode, mmap memory and tag check on\n"); in main()
243 …"Check file memory with private mapping, sync error mode, mmap/mprotect memory and tag check on\n"… in main()
245 "Check file memory with shared mapping, sync error mode, mmap memory and tag check on\n"); in main()
247 "Check file memory with shared mapping, sync error mode, mmap/mprotect memory and tag check on\n"); in main()
249 "Check file memory with private mapping, async error mode, mmap memory and tag check on\n"); in main()
251 …"Check file memory with private mapping, async error mode, mmap/mprotect memory and tag check on\n… in main()
253 "Check file memory with shared mapping, async error mode, mmap memory and tag check on\n"); in main()
255 …"Check file memory with shared mapping, async error mode, mmap/mprotect memory and tag check on\n"… in main()
258 "Check clear PROT_MTE flags with private mapping, sync error mode and mmap memory\n"); in main()
260 "Check clear PROT_MTE flags with private mapping and sync error mode and mmap/mprotect memory\n"); in main()