summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-28 17:37:54 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-28 17:37:54 +0100
commitd088a062c1dcbd5047a6bf41ccb2cb1da2c78060 (patch)
tree8754ffd902b553ca3e95486d3ee6fba4d3c2ec46 /kern
parent43347f8e5f17cf246d2199b4db5b899e8bb08557 (diff)
Add memory object proxies
Memory object proxies permit to replicate objects with different parameters, like reduced privileged, different offset, etc. They are e.g. essential for properly managing memory access permissions. 2005-06-06 Marcus Brinkmann <marcus@gnu.org> * include/mach/mach4.defs: Add memory_object_create_proxy interface. * Makefile.in (vm-cfiles): Add memory_object_proxy.c. * i386/include/mach/i386/vm_types.h (vm_offset_array_t): New type. * include/mach/memory_object.h (memory_object_array_t): New type. * vm/memory_object_proxy.c: New file. * kern/ipc_kobject.h: New macro IKOT_PAGER_PROXY. Bump up macros IKOT_UNKNOWN and IKOT_MAX_TYPE. * kern/ipc_kobject.c (ipc_kobject_notify): Call memory_object_proxy_notify for IKOT_PAGER_PROXY. * vm/vm_init.c (vm_mem_init): Call memory_object_proxy_init. * vm/vm_user.c (vm_map): Implement support for proxy memory objects.
Diffstat (limited to 'kern')
-rw-r--r--kern/ipc_kobject.c3
-rw-r--r--kern/ipc_kobject.h5
2 files changed, 6 insertions, 2 deletions
diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
index 959cc0d..3d8775b 100644
--- a/kern/ipc_kobject.c
+++ b/kern/ipc_kobject.c
@@ -355,6 +355,9 @@ ipc_kobject_notify(request_header, reply_header)
case IKOT_DEVICE:
return ds_notify(request_header);
+ case IKOT_PAGER_PROXY:
+ return memory_object_proxy_notify(request_header);
+
default:
return FALSE;
}
diff --git a/kern/ipc_kobject.h b/kern/ipc_kobject.h
index 7ffa99f..cb79574 100644
--- a/kern/ipc_kobject.h
+++ b/kern/ipc_kobject.h
@@ -77,9 +77,10 @@ typedef unsigned int ipc_kobject_type_t;
#define IKOT_LOCK_SET 24
#define IKOT_CLOCK 25
#define IKOT_CLOCK_CTRL 26
+#define IKOT_PAGER_PROXY 27
/* << new entries here */
-#define IKOT_UNKNOWN 27 /* magic catchall */
-#define IKOT_MAX_TYPE 28 /* # of IKOT_ types */
+#define IKOT_UNKNOWN 28 /* magic catchall */
+#define IKOT_MAX_TYPE 29 /* # of IKOT_ types */
/* Please keep ipc/ipc_object.c:ikot_print_array up to date */
#define is_ipc_kobject(ikot) (ikot != IKOT_NONE)