| /xnu-11215/tests/ |
| H A D | mach_port_mod_refs.c | 17 ret = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_PORT_SET, &port_set); 20 ret = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port); 26 ret = task_get_exc_guard_behavior(mach_task_self(), &old); 29 ret = task_set_exc_guard_behavior(mach_task_self(), new); 37 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, -1); 41 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND_ONCE, -1); 45 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_PORT_SET, -1); 49 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_DEAD_NAME, -1); 53 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_LABELH, -1); 57 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_NUMBER, -1); [all …]
|
| H A D | task_ident_test.c | 28 kr = task_create_identity_token(mach_task_self(), &token); 31 port1 = mach_task_self(); 36 mach_port_deallocate(mach_task_self(), port2); 38 kr = task_get_special_port(mach_task_self(), TASK_READ_PORT, &port1); 44 mach_port_deallocate(mach_task_self(), port1); 45 mach_port_deallocate(mach_task_self(), port2); 53 mach_port_deallocate(mach_task_self(), port1); 54 mach_port_deallocate(mach_task_self(), port2); 62 mach_port_deallocate(mach_task_self(), port1); 63 mach_port_deallocate(mach_task_self(), port2); [all …]
|
| H A D | imm_pinned_control_port_crasher.c | 98 mach_port_t task_self = mach_task_self(); in pinned_test_task_self_dealloc() 110 …kern_return_t kr = mach_port_mod_refs(mach_task_self(), mach_task_self(), MACH_PORT_RIGHT_SEND, -2… in pinned_test_task_self_mod_ref() 123 mach_port_deallocate(mach_task_self(), th_kp); in pinned_test_task_threads_mod_ref() 136 kern_return_t kr = mach_port_destroy(mach_task_self(), mach_task_self()); in pinned_test_mach_port_destroy() 147 kern_return_t kr = mach_port_deallocate(mach_task_self(), mach_task_self()); in pinned_test_move_send_as_remote_port() 224 mach_port_deallocate(mach_task_self(), port); in immovable_test_copy_send_thread_self() 275 kr = thread_create(mach_task_self(), &port); in immovable_test_move_send_raw_thread() 279 kr = thread_create(mach_task_self(), &port); in immovable_test_move_send_raw_thread() 314 header.msgh_remote_port = mach_task_self(); in cfi_test_no_bit_set() 334 header.msgh_remote_port = mach_task_self(); in cfi_test_two_bits_set() [all …]
|
| H A D | vm_test_mach_map.c | 630 mach_task_self(), 956 mach_task_self(), 970 mach_task_self(), 1029 mach_task_self(), 1045 mach_task_self(), 1188 mach_task_self(), 1275 mach_task_self(), 1599 mach_task_self(), 1665 mach_task_self(), 2036 mach_task_self(), [all …]
|
| H A D | mach_service_port.c | 69 kr = mach_port_construct(mach_task_self(), &opts, SP_CONTEXT, &service_port); 77 kr = mach_port_construct(mach_task_self(), &opts2, 0x0, &connection_port); 86 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, ¬ify_port); 119 kr = mach_port_destruct(mach_task_self(), service_port, 0, SP_CONTEXT); 146 kr = mach_port_get_service_port_info(mach_task_self(), service_port, &sp_info); in do_mach_notify_port_destroyed() 206 kr = mach_port_construct(mach_task_self(), &opts, SP_CONTEXT, &service_port_2); 214 kr = mach_port_construct(mach_task_self(), &opts2, SP_CONTEXT, &service_port_2); 221 kr = mach_port_construct(mach_task_self(), &opts3, SP_CONTEXT, &fake_service_port); 233 kr = mach_port_construct(mach_task_self(), &opts4, 0x0, &connection_port); 256 kr = mach_port_construct(mach_task_self(), &opts, 0, &service_port_2); [all …]
|
| H A D | imm_pinned_control_port.c | 198 mach_port_t task = mach_task_self(); in alloc_exception_port() 215 kr = task_set_special_port(mach_task_self(), TASK_BOOTSTRAP_PORT, mach_task_self()); in test_immovable_port_stashing() 221 mach_port_t stash[1] = {mach_task_self()}; in test_immovable_port_stashing() 252 mach_port_deallocate(mach_task_self(), port); in test_task_thread_port_values() 257 mach_port_deallocate(mach_task_self(), port); in test_task_thread_port_values() 263 mach_port_deallocate(mach_task_self(), port); in test_task_thread_port_values() 284 mach_vm_deallocate(mach_task_self(), in test_task_thread_port_values() 289 mach_port_deallocate(mach_task_self(), th_self); in test_task_thread_port_values() 301 mach_port_deallocate(mach_task_self(), host); in test_task_thread_port_values() 311 if (taskList[i] == mach_task_self()) { in test_task_thread_port_values() [all …]
|
| H A D | exception_ports_info.c | 45 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &exc_port1); 47 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &exc_port2); 49 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &exc_port3); 56 kr = mach_port_insert_right(mach_task_self(), exc_port1, exc_port1, MACH_MSG_TYPE_MAKE_SEND); 58 kr = mach_port_insert_right(mach_task_self(), exc_port2, exc_port2, MACH_MSG_TYPE_MAKE_SEND); 60 kr = mach_port_insert_right(mach_task_self(), exc_port3, exc_port3, MACH_MSG_TYPE_MAKE_SEND); 69 mach_task_self(), 77 mach_task_self(), 85 mach_task_self(), 126 kr = mach_port_kernel_object(mach_task_self(), mach_task_self(), &kotype, &kobject); [all …]
|
| H A D | mktimer_kobject.c | 26 kr = task_get_exc_guard_behavior(mach_task_self(), &old); 29 kr = task_set_exc_guard_behavior(mach_task_self(), new); 39 mach_port_set_context(mach_task_self(), timer_port, (mach_port_context_t) 0x1); 43 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, ¬ify_port); 46 kr = mach_port_set_context(mach_task_self(), notify_port, (mach_port_context_t) 0x2); 58 kr = mach_port_request_notification(mach_task_self(), timer_port, MACH_NOTIFY_PORT_DESTROYED, 64 kr = task_set_exc_guard_behavior(mach_task_self(), old);
|
| H A D | task_is_self.c | 18 …T_ASSERT_MACH_SUCCESS(task_get_special_port(mach_task_self(), TASK_READ_PORT, &self_read), "task_g… 19 …T_ASSERT_MACH_SUCCESS(task_get_special_port(mach_task_self(), TASK_INSPECT_PORT, &self_insp), "tas… 20 …T_ASSERT_MACH_SUCCESS(task_get_special_port(mach_task_self(), TASK_NAME_PORT, &self_name), "task_g… 22 …T_ASSERT_MACH_SUCCESS(mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port), "mach_… 25 T_EXPECT_NE(self_read, mach_task_self(), "read and control port should be different"); 27 T_EXPECT_EQ(1, mach_task_is_self(mach_task_self()), "control port should point to self");
|
| H A D | mach_eventlink.c | 292 mach_port_deallocate(mach_task_self(), port_pair[0]); 293 mach_port_deallocate(mach_task_self(), port_pair[1]); 416 mach_port_deallocate(mach_task_self(), port_pair[0]); 417 mach_port_deallocate(mach_task_self(), port_pair[1]); 442 mach_port_deallocate(mach_task_self(), port_pair[0]); 443 mach_port_deallocate(mach_task_self(), port_pair[1]); 476 mach_port_deallocate(mach_task_self(), port_pair[1]); 510 mach_port_deallocate(mach_task_self(), port_pair[0]); 535 mach_port_deallocate(mach_task_self(), port_pair[0]); 538 mach_port_deallocate(mach_task_self(), port_pair[1]); [all …]
|
| H A D | task_policy.c | 30 T_ASSERT_MACH_SUCCESS(task_name_for_pid(mach_task_self(), getpid(), 48 T_ASSERT_MACH_SUCCESS(task_policy_set(mach_task_self(), 92 T_ASSERT_MACH_SUCCESS(task_for_pid(mach_task_self(), pid, 122 T_ASSERT_MACH_SUCCESS(task_name_for_pid(mach_task_self(), pid, 192 T_ASSERT_MACH_SUCCESS(task_policy_get(mach_task_self(), 265 T_ASSERT_MACH_SUCCESS(task_for_pid(mach_task_self(), pid, 295 T_ASSERT_MACH_SUCCESS(task_name_for_pid(mach_task_self(), pid, 339 T_ASSERT_MACH_SUCCESS(task_policy_set(mach_task_self(), 382 T_ASSERT_MACH_SUCCESS(task_for_pid(mach_task_self(), pid, 482 T_ASSERT_MACH_SUCCESS(task_policy_get(mach_task_self(), [all …]
|
| H A D | mach_port_deallocate_21692215.c | 18 ret = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_PORT_SET, &port_set); 22 ret = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port[i]); 25 ret = mach_port_move_member(mach_task_self(), port[i], port_set); 34 ret = mach_port_mod_refs(mach_task_self(), port[i], MACH_PORT_RIGHT_RECEIVE, -1); 38 ret = mach_port_deallocate(mach_task_self(), port_set);
|
| H A D | kernel_inspection.c | 101 (void)mach_port_deallocate(mach_task_self(), threads[i]); in attempt_kernel_inspection() 103 mach_vm_deallocate(mach_task_self(), in attempt_kernel_inspection() 117 mach_vm_deallocate(mach_task_self(), in attempt_kernel_inspection() 122 mach_vm_deallocate(mach_task_self(), in attempt_kernel_inspection() 149 …kr = task_set_mach_voucher(task, mach_task_self()); /* voucher arg is unused, can be whatever port… in attempt_kernel_inspection() 183 mach_vm_deallocate(mach_task_self(), 195 mach_vm_deallocate(mach_task_self(), 199 mach_port_deallocate(mach_task_self(), pset); 200 mach_port_deallocate(mach_task_self(), psets[i]); 202 mach_vm_deallocate(mach_task_self(),
|
| /xnu-11215/tests/ipc/ |
| H A D | ipc_read_inspect.c | 95 mach_port_deallocate(mach_task_self(), tfp_port); in test_task_get_special_port() 107 mach_port_deallocate(mach_task_self(), tfp_port); in test_task_get_special_port() 119 mach_port_deallocate(mach_task_self(), tfp_port); in test_task_get_special_port() 240 mach_port_deallocate(mach_task_self(), host); in test_processor_set_tasks() 305 kr = mach_vm_remap_new(mach_task_self(), in test_task_port_mig_intrans() 357 kr = mach_vm_remap_new(mach_task_self(), in test_task_port_mig_intrans() 384 kr = mach_vm_remap_new(mach_task_self(), in test_task_port_mig_intrans() 520 mach_port_deallocate(mach_task_self(), tp); in test_get_child_task_port() 521 mach_port_deallocate(mach_task_self(), tr); in test_get_child_task_port() 522 mach_port_deallocate(mach_task_self(), ti); in test_get_child_task_port() [all …]
|
| H A D | immovable_rights.c | 20 kr = mach_port_construct(mach_task_self(), &opts, 0x10, &imm_port); 25 kr = mach_port_get_attributes(mach_task_self(), imm_port, 34 kr = mach_port_construct(mach_task_self(), &opts2, 0, &imm_port2); 37 …kr = mach_port_guard_with_flags(mach_task_self(), imm_port2, 0x11, (uint64_t)MPG_IMMOVABLE_RECEIVE… 40 kr = mach_port_get_attributes(mach_task_self(), imm_port2, 46 kr = mach_port_swap_guard(mach_task_self(), imm_port2, 0x11, 0xde18); 49 kr = mach_port_unguard(mach_task_self(), imm_port2, 0xde18);
|
| H A D | ipc_thread_ports_race.c | 74 mach_port_deallocate(mach_task_self(), threadList[i]); in test_race() 77 vm_deallocate(mach_task_self(), (vm_address_t)threadList, in test_race() 84 if (task != mach_task_self()) { in test_race() 85 mach_port_deallocate(mach_task_self(), task); in test_race() 130 kern_return_t kr = task_for_pid(mach_task_self(), pid, &tp); in fork_child_test() 133 int rc = task_read_for_pid(mach_task_self(), pid, &tp); in fork_child_test() 154 local_test(true, mach_task_self()); 156 kr = task_get_special_port(mach_task_self(), TASK_READ_PORT, &tp);
|
| /xnu-11215/tests/vm/ |
| H A D | vm_unaligned_copy_switch_race.c | 39 kr = vm_map(mach_task_self(), in switcheroo_thread() 54 kr = vm_map(mach_task_self(), in switcheroo_thread() 101 kr = vm_allocate(mach_task_self(), 109 kr = vm_protect(mach_task_self(), 136 kr = vm_map(mach_task_self(), 149 kr = vm_map(mach_task_self(), 163 kr = vm_allocate(mach_task_self(), 177 kr = vm_allocate(mach_task_self(), 214 kr = vm_allocate(mach_task_self(), 221 kr = vm_allocate(mach_task_self(), [all …]
|
| H A D | vm_test_shreg_ro.c | 72 kr = mach_vm_region_recurse(mach_task_self(), in find_nested_read_only_mapping() 165 kr = mach_vm_allocate(mach_task_self(), 192 kr = mach_vm_remap(mach_task_self(), 197 mach_task_self(), 226 kr = mach_vm_protect(mach_task_self(), 256 kr = mach_vm_protect(mach_task_self(), 285 kr = mach_vm_allocate(mach_task_self(), 336 kr = mach_vm_allocate(mach_task_self(), 345 kr = mach_vm_write(mach_task_self(), 375 kr = mach_vm_protect(mach_task_self(), [all …]
|
| H A D | vm_memory_entry_parent_test.c | 44 kr = mach_vm_allocate(mach_task_self(), &src_addr, size, VM_FLAGS_ANYWHERE); 58 kr = mach_make_memory_entry_64(mach_task_self(), 73 kr = mach_make_memory_entry_64(mach_task_self(), 85 kr = mach_vm_map(mach_task_self(), 129 kr = mach_vm_map(mach_task_self(), &alloced_addr, KB16, 0, VM_FLAGS_ANYWHERE, 141 kr = mach_make_memory_entry_64(mach_task_self(), &entry_size, alloced_addr, 160 kr = mach_make_memory_entry_64(mach_task_self(), &parent_size, alloced_addr, 170 kr = mach_make_memory_entry_64(mach_task_self(), &entry_size, alloced_addr, 196 kr = mach_make_memory_entry_64(mach_task_self(), &entry_size, 0, 206 kr = mach_make_memory_entry_64(mach_task_self(), &entry_size, 0, [all …]
|
| H A D | vm_unaligned_copy_protection_race.c | 36 kr = vm_protect(mach_task_self(), in protect_thread() 45 kr = vm_protect(mach_task_self(), in protect_thread() 97 kr = vm_allocate(mach_task_self(), 104 kr = vm_allocate(mach_task_self(), 114 kr = vm_allocate(mach_task_self(), 124 kr = vm_read(mach_task_self(), 132 kr = vm_allocate(mach_task_self(), 144 kr = vm_read_overwrite(mach_task_self(), 175 vm_deallocate(mach_task_self(), e1, ctx->obj_size); 177 vm_deallocate(mach_task_self(), e2, ctx->obj_size); [all …]
|
| H A D | vm_test_linkedit_permanent.c | 72 kr = mach_vm_region_recurse(mach_task_self(), in find_first_read_only_mapping() 152 kr = mach_vm_region_recurse(mach_task_self(), 169 kr = mach_vm_allocate(mach_task_self(), 178 kr = mach_vm_write(mach_task_self(), 188 kr = mach_vm_region_recurse(mach_task_self(), 205 kr = mach_vm_allocate(mach_task_self(), 215 kr = mach_vm_region_recurse(mach_task_self(), 232 kr = mach_vm_remap(mach_task_self(), 237 mach_task_self(), 249 kr = mach_vm_region_recurse(mach_task_self(), [all …]
|
| H A D | vm_user.c | 50 kr = mach_vm_allocate(mach_task_self(), &addr, size, in get_permanent_mapping() 58 kr = mach_vm_protect(mach_task_self(), addr, size, FALSE, VM_PROT_READ); in get_permanent_mapping() 83 kr2 = mach_vm_allocate(mach_task_self(), &addr2, size, 110 kr2 = mach_vm_protect(mach_task_self(), addr, size, TRUE, 139 kr2 = mach_vm_allocate(mach_task_self(), &addr2, size, 144 kr2 = mach_vm_remap(mach_task_self(), &remap_addr, size, 0, 146 mach_task_self(), addr2, TRUE, 173 kr2 = mach_vm_deallocate(mach_task_self(), addr, size);
|
| /xnu-11215/tools/tests/superpages/ |
| H A D | testsp.c | 265 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_allocate_size_any() 302 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_allocatefixed() 405 mach_vm_deallocate(mach_task_self(), addr, size); in test_reallocate() 409 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_reallocate() 446 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_wire() 483 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_unwire() 522 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_readonly() 561 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_readonlysubpage() 604 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_fork() 663 kr = mach_vm_deallocate(mach_task_self(), addr1, size); in test_fileio() [all …]
|
| /xnu-11215/libsyscall/mach/ |
| H A D | mach_right.c | 70 kr = mach_port_construct(mach_task_self(), &opts, ctx, &p); in mach_right_recv_construct() 95 kr = mach_port_destruct(mach_task_self(), r.mrr_name, srd, ctx); in mach_right_recv_destruct() 104 kr = mach_port_insert_right(mach_task_self(), r.mrr_name, r.mrr_name, in mach_right_send_create() 117 kr = mach_port_mod_refs(mach_task_self(), s.mrs_name, in mach_right_send_retain() 142 kr = mach_port_mod_refs(mach_task_self(), s.mrs_name, in mach_right_send_release() 148 kr = mach_port_mod_refs(mach_task_self(), s.mrs_name, in mach_right_send_release() 162 kern_return_t kr = mach_port_extract_right(mach_task_self(), r.mrr_name, in mach_right_send_once_create() 174 kr = mach_port_mod_refs(mach_task_self(), so.mrso_name, in mach_right_send_once_consume() 180 kr = mach_port_mod_refs(mach_task_self(), so.mrso_name, in mach_right_send_once_consume()
|
| /xnu-11215/tests/iokit/ |
| H A D | map_memory_port_leak_45265408.c | 28 …T_QUIET; T_ASSERT_MACH_SUCCESS(mach_port_names(mach_task_self(), &portNameArray, &portNameCount, &… in getPortNameCount() 29 …vm_deallocate(mach_task_self(), (vm_address_t) portNameArray, portNameCount * sizeof(*portNameArra… in getPortNameCount() 30 …vm_deallocate(mach_task_self(), (vm_address_t) portTypeArray, portTypeCount * sizeof(*portTypeArra… in getPortNameCount() 50 …T_QUIET; T_ASSERT_MACH_SUCCESS(IOServiceOpen(service, mach_task_self(), 1, &connect), "open servic… 53 mach_task_self(), 60 mach_task_self(),
|