X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..39236c6e673c41db228275375ab7fdb0f837b292:/osfmk/man/vm_protect.html diff --git a/osfmk/man/vm_protect.html b/osfmk/man/vm_protect.html old mode 100755 new mode 100644 index af0327ecf..8154ed724 --- a/osfmk/man/vm_protect.html +++ b/osfmk/man/vm_protect.html @@ -1 +1,110 @@ -
Function - Set access privilege attribute for a region of virtual memory.
kern_return_t vm_protect (vm_task_t target_task, vm_address_t address, vm_size_t size, boolean_t set_maximum, vm_prot_t new_protection);
The vm_protect function sets access privileges for a region within the specified task's address space. The new_protection parameter specifies a combination of read, write, and execute accesses that are allowed (rather than prohibited).
The region starts at the beginning of the virtual page containing address; it ends at the end of the virtual page containing address + size - 1. Because of this rounding to virtual page boundaries, the amount of memory protected may be greater than size. Use host_page_size to find the current virtual page size.
The enforcement of virtual memory protection is machine-dependent. Nominally read access requires VM_PROT_READ permission, write access requires VM_PROT_WRITE permission, and execute access requires VM_PROT_EXECUTE permission. However, some combinations of access rights may not be supported. In particular, the kernel interface allows write access to require VM_PROT_READ and VM_PROT_WRITE permission and execute access to require VM_PROT_READ permission.
This interface is machine word length specific because of the virtual address parameter.
Functions: host_page_size, vm_inherit, vm_region. \ No newline at end of file +
+Function - Set access privilege attribute for a region of virtual memory. +
+kern_return_t vm_protect + (vm_task_t target_task, + vm_address_t address, + vm_size_t size, + boolean_t set_maximum, + vm_prot_t new_protection); ++
+
+
+
+
+
+
+
+
+The vm_protect function sets access privileges for +a region within the specified +task's address space. +The new_protection parameter specifies a combination +of read, write, and +execute accesses that are allowed (rather than prohibited). +
+The region starts at the beginning of the virtual page containing +address; it ends +at the end of the virtual page containing address + +size - 1. Because of this +rounding to virtual page boundaries, the amount of memory protected may be +greater than size. Use host_page_size +to find the current virtual page size. +
+The enforcement of virtual memory protection is machine-dependent. +Nominally read access requires VM_PROT_READ permission, +write access requires +VM_PROT_WRITE permission, and execute access requires +VM_PROT_EXECUTE permission. However, some combinations +of access rights may not be +supported. In particular, the kernel interface allows write access to require +VM_PROT_READ and VM_PROT_WRITE permission and execute access to +require VM_PROT_READ permission. +
+This interface is machine word length specific because of the virtual address +parameter. +
+
+
+Functions: +host_page_size, +vm_inherit, +vm_region.