SHARED_REGION_TRACE_DEBUG(
("shared_region: -> get(%p)\n",
- task));
+ (void *)VM_KERNEL_ADDRPERM(task)));
task_lock(task);
vm_shared_region_lock();
SHARED_REGION_TRACE_DEBUG(
("shared_region: get(%p) <- %p\n",
- task, shared_region));
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
return shared_region;
}
{
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> base_address(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 1);
SHARED_REGION_TRACE_DEBUG(
("shared_region: base_address(%p) <- 0x%llx\n",
- shared_region, (long long)shared_region->sr_base_address));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ (long long)shared_region->sr_base_address));
return shared_region->sr_base_address;
}
{
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> size(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 1);
SHARED_REGION_TRACE_DEBUG(
("shared_region: size(%p) <- 0x%llx\n",
- shared_region, (long long)shared_region->sr_size));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ (long long)shared_region->sr_size));
return shared_region->sr_size;
}
{
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> mem_entry(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 1);
SHARED_REGION_TRACE_DEBUG(
("shared_region: mem_entry(%p) <- %p\n",
- shared_region, shared_region->sr_mem_entry));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ (void *)VM_KERNEL_ADDRPERM(shared_region->sr_mem_entry)));
return shared_region->sr_mem_entry;
}
{
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> vm_shared_region_get_slide(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 1);
SHARED_REGION_TRACE_DEBUG(
("shared_region: vm_shared_region_get_slide(%p) <- %u\n",
- shared_region, shared_region->sr_slide_info.slide));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ shared_region->sr_slide_info.slide));
/* 0 if we haven't slid */
assert(shared_region->sr_slide_info.slide_object != NULL ||
{
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> vm_shared_region_get_slide_info(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 1);
SHARED_REGION_TRACE_DEBUG(
("shared_region: vm_shared_region_get_slide_info(%p) <- %p\n",
- shared_region, &shared_region->sr_slide_info));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ (void *)VM_KERNEL_ADDRPERM(&shared_region->sr_slide_info)));
return &shared_region->sr_slide_info;
}
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> set(%p, %p)\n",
- task, new_shared_region));
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(new_shared_region)));
task_lock(task);
vm_shared_region_lock();
SHARED_REGION_TRACE_DEBUG(
("shared_region: set(%p) <- old=%p new=%p\n",
- task, old_shared_region, new_shared_region));
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(old_shared_region),
+ (void *)VM_KERNEL_ADDRPERM(new_shared_region)));
}
/*
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> lookup(root=%p,cpu=%d,64bit=%d)\n",
- root_dir, cputype, is_64bit));
+
+ (void *)VM_KERNEL_ADDRPERM(root_dir), cputype, is_64bit));
shared_region = NULL;
new_shared_region = NULL;
SHARED_REGION_TRACE_DEBUG(
("shared_region: lookup(root=%p,cpu=%d,64bit=%d) <- %p\n",
- root_dir, cputype, is_64bit, shared_region));
+ (void *)VM_KERNEL_ADDRPERM(root_dir),
+ cputype, is_64bit,
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 0);
return shared_region;
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> reference_locked(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 0);
shared_region->sr_ref_count++;
SHARED_REGION_TRACE_DEBUG(
("shared_region: reference_locked(%p) <- %d\n",
- shared_region, shared_region->sr_ref_count));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ shared_region->sr_ref_count));
}
/*
{
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> deallocate(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
vm_shared_region_lock();
shared_region->sr_ref_count--;
SHARED_REGION_TRACE_DEBUG(
("shared_region: deallocate(%p): ref now %d\n",
- shared_region, shared_region->sr_ref_count));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ shared_region->sr_ref_count));
if (shared_region->sr_ref_count == 0) {
uint64_t deadline;
SHARED_REGION_TRACE_DEBUG(
("shared_region: deallocate(%p): armed timer\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
vm_shared_region_unlock();
} else {
SHARED_REGION_TRACE_DEBUG(
("shared_region: deallocate(%p) <-\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
}
void
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> create(root=%p,cpu=%d,64bit=%d)\n",
- root_dir, cputype, is_64bit));
+ (void *)VM_KERNEL_ADDRPERM(root_dir), cputype, is_64bit));
base_address = 0;
size = 0;
("shared_region: create(root=%p,cpu=%d,64bit=%d,"
"base=0x%llx,size=0x%llx) <- "
"%p mem=(%p,%p) map=%p pmap=%p\n",
- root_dir, cputype, is_64bit, (long long)base_address,
- (long long)size, shared_region,
- mem_entry_port, mem_entry, sub_map, sub_map->pmap));
+ (void *)VM_KERNEL_ADDRPERM(root_dir),
+ cputype, is_64bit, (long long)base_address,
+ (long long)size,
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ (void *)VM_KERNEL_ADDRPERM(mem_entry_port),
+ (void *)VM_KERNEL_ADDRPERM(mem_entry),
+ (void *)VM_KERNEL_ADDRPERM(sub_map),
+ (void *)VM_KERNEL_ADDRPERM(sub_map->pmap)));
} else {
SHARED_REGION_TRACE_INFO(
("shared_region: create(root=%p,cpu=%d,64bit=%d,"
"base=0x%llx,size=0x%llx) <- NULL",
- root_dir, cputype, is_64bit, (long long)base_address,
+ (void *)VM_KERNEL_ADDRPERM(root_dir),
+ cputype, is_64bit, (long long)base_address,
(long long)size));
}
return shared_region;
SHARED_REGION_TRACE_INFO(
("shared_region: -> destroy(%p) (root=%p,cpu=%d,64bit=%d)\n",
- shared_region,
- shared_region->sr_root_dir,
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ (void *)VM_KERNEL_ADDRPERM(shared_region->sr_root_dir),
shared_region->sr_cpu_type,
shared_region->sr_64bit));
SHARED_REGION_TRACE_DEBUG(
("shared_region: destroy(%p) <-\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
shared_region = NULL;
}
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> start_address(%p)\n",
- shared_region));
+ (void *)VM_KERNEL_ADDRPERM(shared_region)));
assert(shared_region->sr_ref_count > 1);
vm_shared_region_lock();
SHARED_REGION_TRACE_DEBUG(
("shared_region: start_address(%p) <- 0x%llx\n",
- shared_region, (long long)shared_region->sr_base_address));
+ (void *)VM_KERNEL_ADDRPERM(shared_region),
+ (long long)shared_region->sr_base_address));
return kr;
}
void
vm_shared_region_undo_mappings(
- vm_map_t sr_map,
- mach_vm_offset_t sr_base_address,
- struct shared_file_mapping_np *mappings,
- unsigned int mappings_count)
+ vm_map_t sr_map,
+ mach_vm_offset_t sr_base_address,
+ struct shared_file_mapping_np *mappings,
+ unsigned int mappings_count)
{
unsigned int j = 0;
vm_shared_region_t shared_region = NULL;
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> map(%p,%d,%p,%p,0x%llx)\n",
- shared_region, mappings_count, mappings,
- file_control, file_size));
+ (void *)VM_KERNEL_ADDRPERM(shared_region), mappings_count,
+ (void *)VM_KERNEL_ADDRPERM(mappings),
+ (void *)VM_KERNEL_ADDRPERM(file_control), file_size));
/* get the VM object associated with the file to be mapped */
file_object = memory_object_control_to_vm_object(file_control);
(long long)slide_start,
(long long)slide_size,
kr));
- vm_shared_region_undo_mappings(NULL,
- 0,
+ vm_shared_region_undo_mappings(sr_map,
+ sr_base_address,
mappings,
mappings_count);
}
done:
SHARED_REGION_TRACE_DEBUG(
("shared_region: map(%p,%d,%p,%p,0x%llx) <- 0x%x \n",
- shared_region, mappings_count, mappings,
- file_control, file_size, kr));
+ (void *)VM_KERNEL_ADDRPERM(shared_region), mappings_count,
+ (void *)VM_KERNEL_ADDRPERM(mappings),
+ (void *)VM_KERNEL_ADDRPERM(file_control), file_size, kr));
return kr;
}
SHARED_REGION_TRACE_DEBUG(
("shared_region: -> "
"enter(map=%p,task=%p,root=%p,cpu=%d,64bit=%d)\n",
- map, task, fsroot, cpu, is_64bit));
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot), cpu, is_64bit));
/* lookup (create if needed) the shared region for this environment */
shared_region = vm_shared_region_lookup(fsroot, cpu, is_64bit);
("shared_region: -> "
"enter(map=%p,task=%p,root=%p,cpu=%d,64bit=%d): "
"lookup failed !\n",
- map, task, fsroot, cpu, is_64bit));
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot), cpu, is_64bit));
//panic("shared_region_enter: lookup failed\n");
return KERN_FAILURE;
}
SHARED_REGION_TRACE_ERROR(
("shared_region: enter(%p,%p,%p,%d,%d): "
"vm_map_enter(0x%llx,0x%llx,%p) error 0x%x\n",
- map, task, fsroot, cpu, is_64bit,
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot),
+ cpu, is_64bit,
(long long)target_address,
- (long long)mapping_size, sr_handle, kr));
+ (long long)mapping_size,
+ (void *)VM_KERNEL_ADDRPERM(sr_handle), kr));
goto done;
}
SHARED_REGION_TRACE_DEBUG(
("shared_region: enter(%p,%p,%p,%d,%d): "
"vm_map_enter(0x%llx,0x%llx,%p) error 0x%x\n",
- map, task, fsroot, cpu, is_64bit,
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot), cpu, is_64bit,
(long long)target_address, (long long)mapping_size,
- sr_handle, kr));
+ (void *)VM_KERNEL_ADDRPERM(sr_handle), kr));
sr_offset += mapping_size;
sr_size -= mapping_size;
}
SHARED_REGION_TRACE_ERROR(
("shared_region: enter(%p,%p,%p,%d,%d): "
"vm_map_enter(0x%llx,0x%llx,%p) error 0x%x\n",
- map, task, fsroot, cpu, is_64bit,
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot),
+ cpu, is_64bit,
(long long)target_address,
- (long long)mapping_size, sr_handle, kr));
+ (long long)mapping_size,
+ (void *)VM_KERNEL_ADDRPERM(sr_handle), kr));
goto done;
}
SHARED_REGION_TRACE_DEBUG(
("shared_region: enter(%p,%p,%p,%d,%d): "
"nested vm_map_enter(0x%llx,0x%llx,%p) error 0x%x\n",
- map, task, fsroot, cpu, is_64bit,
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot), cpu, is_64bit,
(long long)target_address, (long long)mapping_size,
- sr_handle, kr));
+ (void *)VM_KERNEL_ADDRPERM(sr_handle), kr));
}
if (sr_size > 0) {
/* and there's some left to be mapped without pmap-nesting */
SHARED_REGION_TRACE_ERROR(
("shared_region: enter(%p,%p,%p,%d,%d): "
"vm_map_enter(0x%llx,0x%llx,%p) error 0x%x\n",
- map, task, fsroot, cpu, is_64bit,
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot),
+ cpu, is_64bit,
(long long)target_address,
- (long long)mapping_size, sr_handle, kr));
+ (long long)mapping_size,
+ (void *)VM_KERNEL_ADDRPERM(sr_handle), kr));
goto done;
}
SHARED_REGION_TRACE_DEBUG(
("shared_region: enter(%p,%p,%p,%d,%d): "
"vm_map_enter(0x%llx,0x%llx,%p) error 0x%x\n",
- map, task, fsroot, cpu, is_64bit,
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot), cpu, is_64bit,
(long long)target_address, (long long)mapping_size,
- sr_handle, kr));
+ (void *)VM_KERNEL_ADDRPERM(sr_handle), kr));
sr_offset += mapping_size;
sr_size -= mapping_size;
}
done:
SHARED_REGION_TRACE_DEBUG(
("shared_region: enter(%p,%p,%p,%d,%d) <- 0x%x\n",
- map, task, fsroot, cpu, is_64bit, kr));
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task),
+ (void *)VM_KERNEL_ADDRPERM(fsroot), cpu, is_64bit, kr));
return kr;
}
-#define SANE_SLIDE_INFO_SIZE (1024*1024) /*Can be changed if needed*/
+#define SANE_SLIDE_INFO_SIZE (2048*1024) /*Can be changed if needed*/
struct vm_shared_region_slide_info slide_info;
kern_return_t
SHARED_REGION_TRACE_DEBUG(
("commpage: _init(0x%llx) <- %p\n",
- (long long)size, *handlep));
+ (long long)size, (void *)VM_KERNEL_ADDRPERM(*handlep)));
}
#endif
SHARED_REGION_TRACE_DEBUG(
("commpage: -> enter(%p,%p)\n",
- map, task));
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task)));
commpage_text_size = _COMM_PAGE_TEXT_AREA_LENGTH;
/* the comm page is likely to be beyond the actual end of the VM map */
SHARED_REGION_TRACE_ERROR(
("commpage: enter(%p,0x%llx,0x%llx) "
"commpage %p mapping failed 0x%x\n",
- map, (long long)commpage_address,
- (long long)commpage_size, commpage_handle, kr));
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (long long)commpage_address,
+ (long long)commpage_size,
+ (void *)VM_KERNEL_ADDRPERM(commpage_handle), kr));
}
/* map the comm text page in the task's address space */
SHARED_REGION_TRACE_ERROR(
("commpage text: enter(%p,0x%llx,0x%llx) "
"commpage text %p mapping failed 0x%x\n",
- map, (long long)commpage_text_address,
- (long long)commpage_text_size, commpage_text_handle, kr));
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (long long)commpage_text_address,
+ (long long)commpage_text_size,
+ (void *)VM_KERNEL_ADDRPERM(commpage_text_handle), kr));
}
/*
SHARED_REGION_TRACE_ERROR(
("commpage: enter(%p,0x%llx,0x%llx) "
"objc mapping failed 0x%x\n",
- map, (long long)objc_address,
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (long long)objc_address,
(long long)objc_size, kr));
}
}
SHARED_REGION_TRACE_DEBUG(
("commpage: enter(%p,%p) <- 0x%x\n",
- map, task, kr));
+ (void *)VM_KERNEL_ADDRPERM(map),
+ (void *)VM_KERNEL_ADDRPERM(task), kr));
return kr;
}