]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/vm/vm_apple_protect.c
xnu-2050.48.11.tar.gz
[apple/xnu.git] / osfmk / vm / vm_apple_protect.c
index d57cfc71a74b8271ddf43918896ff525d6dcd21e..a98fdbb3af325444e14a9e28c0b7b81810f9d19d 100644 (file)
@@ -130,6 +130,7 @@ const struct memory_object_pager_ops apple_protect_pager_ops = {
        apple_protect_pager_synchronize,
        apple_protect_pager_map,
        apple_protect_pager_last_unmap,
+       NULL, /* data_reclaim */
        "apple protect pager"
 };
 
@@ -354,6 +355,9 @@ apple_protect_pager_data_request(
        upl_pl = NULL;
        fault_info = *((struct vm_object_fault_info *) mo_fault_info);
        fault_info.stealth = TRUE;
+       fault_info.io_sync = FALSE;
+       fault_info.mark_zf_absent = FALSE;
+       fault_info.batch_pmap_op = FALSE;
        interruptible = fault_info.interruptible;
 
        pager = apple_protect_pager_lookup(mem_obj);
@@ -509,7 +513,8 @@ apple_protect_pager_data_request(
                           kernel_mapping,
                           src_page->phys_page,
                           VM_PROT_READ,
-                          src_object->wimg_bits & VM_WIMG_MASK,
+                          VM_PROT_NONE,
+                          0,
                           TRUE);
                /*
                 * Establish an explicit pmap mapping of the destination
@@ -524,7 +529,8 @@ apple_protect_pager_data_request(
                           kernel_mapping + PAGE_SIZE_64,
                           dst_pnum,
                           VM_PROT_READ | VM_PROT_WRITE,
-                          dst_object->wimg_bits & VM_WIMG_MASK,
+                          VM_PROT_NONE,
+                          0,
                           TRUE);
 
                /*
@@ -724,13 +730,13 @@ apple_protect_pager_terminate_internal(
                vm_object_deallocate(pager->backing_object);
                pager->backing_object = VM_OBJECT_NULL;
        }
-
-       /* trigger the destruction of the memory object */
-       memory_object_destroy(pager->pager_control, 0);
        
        /* deallocate any crypt module data */
        if(pager->crypt.crypt_end)
                pager->crypt.crypt_end(pager->crypt.crypt_ops);
+
+       /* trigger the destruction of the memory object */
+       memory_object_destroy(pager->pager_control, 0);
 }
 
 /*