Lines Matching +full:sync +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0
17 1, 555, 1033, MT_GRANULE_SIZE - 1, MT_GRANULE_SIZE,
18 /* page size - 1*/ 0, /* page_size */ 0, /* page size + 1 */ 0
28 static int check_buffer_by_byte(int mem_type, int mode) in check_buffer_by_byte() argument
34 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_buffer_by_byte()
41 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[i]); 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
71 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_buffer_underflow_by_byte()
80 mte_initialize_current_context(mode, (uintptr_t)ptr, -underflow_range); in check_buffer_underflow_by_byte()
83 for (j = sizes[i] - 1; (j >= -underflow_range) && in check_buffer_underflow_by_byte()
84 (!cur_mte_cxt.fault_valid); j--) { in check_buffer_underflow_by_byte()
102 switch (mode) { in check_buffer_underflow_by_byte()
104 if (cur_mte_cxt.fault_valid == true || last_index != -underflow_range) { in check_buffer_underflow_by_byte()
109 und_ptr = (char *) MT_CLEAR_TAG((size_t) ptr - underflow_range); in check_buffer_underflow_by_byte()
137 if (!cur_mte_cxt.fault_valid || (last_index != (-1))) { in check_buffer_underflow_by_byte()
143 if (und_ptr[-1] == '1') 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
167 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_buffer_overflow_by_byte()
178 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[i] + overflow_range); in check_buffer_overflow_by_byte()
200 overflow_size = overflow_range - (tagged_size - sizes[i]); in check_buffer_overflow_by_byte()
202 switch (mode) { in check_buffer_overflow_by_byte()
205 (last_index != (sizes[i] + overflow_range - 1))) { in check_buffer_overflow_by_byte()
261 static int check_buffer_by_block_iterate(int mem_type, int mode, size_t size) in check_buffer_by_block_iterate() argument
309 mte_initialize_current_context(mode, (uintptr_t)dst, size); in check_buffer_by_block_iterate()
336 static int check_buffer_by_block(int mem_type, int mode) in check_buffer_by_block() argument
340 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_buffer_by_block()
344 result = check_buffer_by_block_iterate(mem_type, mode, sizes[i]); in check_buffer_by_block()
365 static int check_memory_initial_tags(int mem_type, int mode, int mapping) in check_memory_initial_tags() argument
371 mte_switch_mode(mode, MTE_ALLOW_NON_ZERO_TAG); in check_memory_initial_tags()
385 if (fd == -1) in check_memory_initial_tags()
409 sizes[item - 3] = page_size - 1; in main()
410 sizes[item - 2] = page_size; in main()
411 sizes[item - 1] = page_size + 1; in main()
425 "Check buffer correctness by byte with sync err mode and mmap memory\n"); in main()
427 "Check buffer correctness by byte with async err mode and mmap memory\n"); in main()
429 "Check buffer correctness by byte with sync err mode and mmap/mprotect memory\n"); in main()
431 "Check buffer correctness by byte with async err mode and mmap/mprotect memory\n"); in main()
435 "Check buffer write underflow by byte with sync mode and mmap memory\n"); in main()
437 "Check buffer write underflow by byte with async mode and mmap memory\n"); in main()
443 "Check buffer write underflow by byte with sync mode and mmap memory\n"); in main()
445 "Check buffer write underflow by byte with async mode and mmap memory\n"); in main()
451 "Check buffer write overflow by byte with sync mode and mmap memory\n"); in main()
453 "Check buffer write overflow by byte with async mode and mmap memory\n"); in main()
455 "Check buffer write overflow by byte with tag fault ignore mode and mmap memory\n"); in main()
459 "Check buffer write correctness by block with sync mode and mmap memory\n"); in main()
461 "Check buffer write correctness by block with async mode and mmap memory\n"); in main()
467 "Check initial tags with private mapping, sync error mode and mmap memory\n"); in main()
469 "Check initial tags with private mapping, sync error mode and mmap/mprotect memory\n"); in main()
471 "Check initial tags with shared mapping, sync error mode and mmap memory\n"); in main()
473 "Check initial tags with shared mapping, sync error mode and mmap/mprotect memory\n"); in main()