The implementation of memory_object_create_proxy should allow a proxy object to be passed as the value of OBJECT, and dereference it, and then make a proxy object with the minimum set of the two.
Note that if you add the range-restriction to this, the result will be that proxy objects need to specify a *list* of permitted ranges, since you might restrict to one range, and then restrict out a slice from the middle of that. Marcus Brinkmann <[EMAIL PROTECTED]> writes: > +/* Create a new proxy memory object from OBJECT with the maximum > + protection MAX_PROTECTION and return it in *PORT. */ > +kern_return_t > +memory_object_create_proxy (ipc_space_t space, ipc_port_t object, > + vm_prot_t max_protection, ipc_port_t *port) > +{ > + kern_return_t kr; > + memory_object_proxy_t proxy; > + ipc_port_t notify; > + > + if (space == IS_NULL) > + return KERN_INVALID_TASK; > + > + if (!IP_VALID(object)) > + return KERN_INVALID_NAME; > + > + proxy = (memory_object_proxy_t) zalloc (memory_object_proxy_zone); > + > + /* Allocate port, keeping a reference for it. */ > + proxy->port = ipc_port_alloc_kernel (); > + if (proxy->port == IP_NULL) > + { > + zfree (memory_object_proxy_zone, (vm_offset_t) proxy); > + return KERN_RESOURCE_SHORTAGE; > + } > + /* Associate the port with the proxy memory object. */ > + ipc_kobject_set (proxy->port, (ipc_kobject_t) proxy, IKOT_PAGER_PROXY); > + > + /* Request no-senders notifications on the port. */ > + notify = ipc_port_make_sonce (proxy->port); > + ip_lock (proxy->port); > + ipc_port_nsrequest (proxy->port, 1, notify, ¬ify); > + assert (notify == IP_NULL); > + > + proxy->object = ipc_port_copy_send (object); > + proxy->max_protection = max_protection; > + > + *port = ipc_port_make_send (proxy->port); > + return KERN_SUCCESS; > +} _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd