2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
32 * Mach Operating System
33 * Copyright (c) 1991,1990 Carnegie Mellon University
34 * All Rights Reserved.
36 * Permission to use, copy, modify and distribute this software and its
37 * documentation is hereby granted, provided that both the copyright
38 * notice and this permission notice appear in all copies of the
39 * software, derivative works or modified versions, and any portions
40 * thereof, and that both notices appear in supporting documentation.
42 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
43 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
44 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
46 * Carnegie Mellon requests users of this software to return to
48 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
49 * School of Computer Science
50 * Carnegie Mellon University
51 * Pittsburgh PA 15213-3890
53 * any improvements or extensions that they make and grant Carnegie Mellon
54 * the rights to redistribute these changes.
59 #include <mach/boolean.h>
60 #include <mach/port.h>
62 #include <mach/mig_errors.h>
63 #include <mach/mach_types.h>
64 #include <mach/mach_traps.h>
66 #include <kern/ipc_tt.h>
67 #include <kern/ipc_mig.h>
68 #include <kern/kalloc.h>
69 #include <kern/task.h>
70 #include <kern/thread.h>
71 #include <kern/ipc_kobject.h>
72 #include <kern/misc_protos.h>
75 #include <ipc/ipc_kmsg.h>
76 #include <ipc/ipc_entry.h>
77 #include <ipc/ipc_object.h>
78 #include <ipc/ipc_mqueue.h>
79 #include <ipc/ipc_space.h>
80 #include <ipc/ipc_port.h>
81 #include <ipc/ipc_pset.h>
82 #include <vm/vm_map.h>
84 #include <libkern/OSAtomic.h>
87 * Routine: mach_msg_send_from_kernel
89 * Send a message from the kernel.
91 * This is used by the client side of KernelUser interfaces
92 * to implement SimpleRoutines. Currently, this includes
93 * memory_object messages.
97 * MACH_MSG_SUCCESS Sent the message.
98 * MACH_SEND_INVALID_DEST Bad destination port.
99 * MACH_MSG_SEND_NO_BUFFER Destination port had inuse fixed bufer
100 * or destination is above kernel limit
103 #if IKM_SUPPORT_LEGACY
105 #undef mach_msg_send_from_kernel
106 mach_msg_return_t
mach_msg_send_from_kernel(
107 mach_msg_header_t
*msg
,
108 mach_msg_size_t send_size
);
111 mach_msg_send_from_kernel(
112 mach_msg_header_t
*msg
,
113 mach_msg_size_t send_size
)
116 mach_msg_return_t mr
;
118 if (!MACH_PORT_VALID(CAST_MACH_PORT_TO_NAME(msg
->msgh_remote_port
)))
119 return MACH_SEND_INVALID_DEST
;
121 mr
= ipc_kmsg_get_from_kernel(msg
, send_size
, &kmsg
);
122 if (mr
!= MACH_MSG_SUCCESS
)
125 ipc_kmsg_copyin_from_kernel_legacy(kmsg
);
127 mr
= ipc_kmsg_send_always(kmsg
);
128 if (mr
!= MACH_MSG_SUCCESS
) {
129 ipc_kmsg_destroy(kmsg
);
135 #endif /* IKM_SUPPORT_LEGACY */
138 mach_msg_send_from_kernel_proper(
139 mach_msg_header_t
*msg
,
140 mach_msg_size_t send_size
)
143 mach_msg_return_t mr
;
145 if (!MACH_PORT_VALID(CAST_MACH_PORT_TO_NAME(msg
->msgh_remote_port
)))
146 return MACH_SEND_INVALID_DEST
;
148 mr
= ipc_kmsg_get_from_kernel(msg
, send_size
, &kmsg
);
149 if (mr
!= MACH_MSG_SUCCESS
)
152 ipc_kmsg_copyin_from_kernel(kmsg
);
154 mr
= ipc_kmsg_send_always(kmsg
);
155 if (mr
!= MACH_MSG_SUCCESS
) {
156 ipc_kmsg_destroy(kmsg
);
162 #if IKM_SUPPORT_LEGACY
165 mach_msg_send_from_kernel_with_options(
166 mach_msg_header_t
*msg
,
167 mach_msg_size_t send_size
,
168 mach_msg_option_t option
,
169 mach_msg_timeout_t timeout_val
)
172 mach_msg_return_t mr
;
174 if (!MACH_PORT_VALID(CAST_MACH_PORT_TO_NAME(msg
->msgh_remote_port
)))
175 return MACH_SEND_INVALID_DEST
;
177 mr
= ipc_kmsg_get_from_kernel(msg
, send_size
, &kmsg
);
178 if (mr
!= MACH_MSG_SUCCESS
)
181 ipc_kmsg_copyin_from_kernel_legacy(kmsg
);
182 mr
= ipc_kmsg_send(kmsg
, option
, timeout_val
);
183 if (mr
!= MACH_MSG_SUCCESS
) {
184 ipc_kmsg_destroy(kmsg
);
190 #endif /* IKM_SUPPORT_LEGACY */
193 * Routine: mach_msg_rpc_from_kernel
195 * Send a message from the kernel and receive a reply.
196 * Uses ith_rpc_reply for the reply port.
198 * This is used by the client side of KernelUser interfaces
199 * to implement Routines.
203 * MACH_MSG_SUCCESS Sent the message.
204 * MACH_RCV_PORT_DIED The reply port was deallocated.
207 mach_msg_return_t
mach_msg_rpc_from_kernel_body(mach_msg_header_t
*msg
,
208 mach_msg_size_t send_size
, mach_msg_size_t rcv_size
, boolean_t legacy
);
210 #if IKM_SUPPORT_LEGACY
212 #undef mach_msg_rpc_from_kernel
214 mach_msg_rpc_from_kernel(
215 mach_msg_header_t
*msg
,
216 mach_msg_size_t send_size
,
217 mach_msg_size_t rcv_size
);
220 mach_msg_rpc_from_kernel(
221 mach_msg_header_t
*msg
,
222 mach_msg_size_t send_size
,
223 mach_msg_size_t rcv_size
)
225 return mach_msg_rpc_from_kernel_body(msg
, send_size
, rcv_size
, TRUE
);
228 #endif /* IKM_SUPPORT_LEGACY */
231 mach_msg_rpc_from_kernel_proper(
232 mach_msg_header_t
*msg
,
233 mach_msg_size_t send_size
,
234 mach_msg_size_t rcv_size
)
236 return mach_msg_rpc_from_kernel_body(msg
, send_size
, rcv_size
, FALSE
);
240 mach_msg_rpc_from_kernel_body(
241 mach_msg_header_t
*msg
,
242 mach_msg_size_t send_size
,
243 mach_msg_size_t rcv_size
,
244 #if !IKM_SUPPORT_LEGACY
249 thread_t self
= current_thread();
252 mach_port_seqno_t seqno
;
253 mach_msg_return_t mr
;
255 assert(MACH_PORT_VALID(CAST_MACH_PORT_TO_NAME(msg
->msgh_remote_port
)));
256 assert(msg
->msgh_local_port
== MACH_PORT_NULL
);
258 mr
= ipc_kmsg_get_from_kernel(msg
, send_size
, &kmsg
);
259 if (mr
!= MACH_MSG_SUCCESS
)
262 reply
= self
->ith_rpc_reply
;
263 if (reply
== IP_NULL
) {
264 reply
= ipc_port_alloc_reply();
265 if ((reply
== IP_NULL
) ||
266 (self
->ith_rpc_reply
!= IP_NULL
))
267 panic("mach_msg_rpc_from_kernel");
268 self
->ith_rpc_reply
= reply
;
271 /* insert send-once right for the reply port */
272 kmsg
->ikm_header
->msgh_local_port
= reply
;
273 kmsg
->ikm_header
->msgh_bits
|=
274 MACH_MSGH_BITS(0, MACH_MSG_TYPE_MAKE_SEND_ONCE
);
276 ipc_port_reference(reply
);
278 #if IKM_SUPPORT_LEGACY
280 ipc_kmsg_copyin_from_kernel_legacy(kmsg
);
282 ipc_kmsg_copyin_from_kernel(kmsg
);
284 ipc_kmsg_copyin_from_kernel(kmsg
);
287 mr
= ipc_kmsg_send_always(kmsg
);
288 if (mr
!= MACH_MSG_SUCCESS
) {
289 ipc_kmsg_destroy(kmsg
);
297 if ( !ip_active(reply
)) {
299 ipc_port_release(reply
);
300 return MACH_RCV_PORT_DIED
;
304 ipc_port_release(reply
);
305 return MACH_RCV_INTERRUPTED
;
308 assert(reply
->ip_pset_count
== 0);
309 mqueue
= &reply
->ip_messages
;
312 self
->ith_continuation
= (void (*)(mach_msg_return_t
))0;
314 ipc_mqueue_receive(mqueue
,
315 MACH_MSG_OPTION_NONE
,
317 MACH_MSG_TIMEOUT_NONE
,
318 THREAD_INTERRUPTIBLE
);
320 mr
= self
->ith_state
;
321 kmsg
= self
->ith_kmsg
;
322 seqno
= self
->ith_seqno
;
324 if (mr
== MACH_MSG_SUCCESS
)
329 assert(mr
== MACH_RCV_INTERRUPTED
);
331 if (self
->handlers
) {
332 ipc_port_release(reply
);
336 ipc_port_release(reply
);
339 * Check to see how much of the message/trailer can be received.
340 * We chose the maximum trailer that will fit, since we don't
341 * have options telling us which trailer elements the caller needed.
343 if (rcv_size
>= kmsg
->ikm_header
->msgh_size
) {
344 mach_msg_format_0_trailer_t
*trailer
= (mach_msg_format_0_trailer_t
*)
345 ((vm_offset_t
)kmsg
->ikm_header
+ kmsg
->ikm_header
->msgh_size
);
347 if (rcv_size
>= kmsg
->ikm_header
->msgh_size
+ MAX_TRAILER_SIZE
) {
348 /* Enough room for a maximum trailer */
349 trailer
->msgh_trailer_size
= MAX_TRAILER_SIZE
;
351 else if (rcv_size
< kmsg
->ikm_header
->msgh_size
+
352 trailer
->msgh_trailer_size
) {
353 /* no room for even the basic (default) trailer */
354 trailer
->msgh_trailer_size
= 0;
356 assert(trailer
->msgh_trailer_type
== MACH_MSG_TRAILER_FORMAT_0
);
357 rcv_size
= kmsg
->ikm_header
->msgh_size
+ trailer
->msgh_trailer_size
;
358 mr
= MACH_MSG_SUCCESS
;
360 mr
= MACH_RCV_TOO_LARGE
;
365 * We want to preserve rights and memory in reply!
366 * We don't have to put them anywhere; just leave them
369 #if IKM_SUPPORT_LEGACY
371 ipc_kmsg_copyout_to_kernel_legacy(kmsg
, ipc_space_reply
);
373 ipc_kmsg_copyout_to_kernel(kmsg
, ipc_space_reply
);
375 ipc_kmsg_copyout_to_kernel(kmsg
, ipc_space_reply
);
377 ipc_kmsg_put_to_kernel(msg
, kmsg
, rcv_size
);
382 /************** These Calls are set up for kernel-loaded tasks/threads **************/
385 * Routine: mach_msg_overwrite
387 * Like mach_msg_overwrite_trap except that message buffers
388 * live in kernel space. Doesn't handle any options.
390 * This is used by in-kernel server threads to make
391 * kernel calls, to receive request messages, and
392 * to send reply messages.
400 mach_msg_header_t
*msg
,
401 mach_msg_option_t option
,
402 mach_msg_size_t send_size
,
403 mach_msg_size_t rcv_size
,
404 mach_port_name_t rcv_name
,
405 __unused mach_msg_timeout_t msg_timeout
,
406 __unused mach_port_name_t notify
,
407 __unused mach_msg_header_t
*rcv_msg
,
408 __unused mach_msg_size_t rcv_msg_size
)
410 ipc_space_t space
= current_space();
411 vm_map_t map
= current_map();
413 mach_port_seqno_t seqno
;
414 mach_msg_return_t mr
;
415 mach_msg_max_trailer_t
*trailer
;
417 if (option
& MACH_SEND_MSG
) {
418 mach_msg_size_t msg_and_trailer_size
;
419 mach_msg_max_trailer_t
*max_trailer
;
421 if ((send_size
< sizeof(mach_msg_header_t
)) || (send_size
& 3))
422 return MACH_SEND_MSG_TOO_SMALL
;
424 if (send_size
> MACH_MSG_SIZE_MAX
- MAX_TRAILER_SIZE
)
425 return MACH_SEND_TOO_LARGE
;
427 msg_and_trailer_size
= send_size
+ MAX_TRAILER_SIZE
;
428 kmsg
= ipc_kmsg_alloc(msg_and_trailer_size
);
430 if (kmsg
== IKM_NULL
)
431 return MACH_SEND_NO_BUFFER
;
433 (void) memcpy((void *) kmsg
->ikm_header
, (const void *) msg
, send_size
);
435 kmsg
->ikm_header
->msgh_size
= send_size
;
438 * Reserve for the trailer the largest space (MAX_TRAILER_SIZE)
439 * However, the internal size field of the trailer (msgh_trailer_size)
440 * is initialized to the minimum (sizeof(mach_msg_trailer_t)), to optimize
441 * the cases where no implicit data is requested.
443 max_trailer
= (mach_msg_max_trailer_t
*) ((vm_offset_t
)kmsg
->ikm_header
+ send_size
);
444 max_trailer
->msgh_sender
= current_thread()->task
->sec_token
;
445 max_trailer
->msgh_audit
= current_thread()->task
->audit_token
;
446 max_trailer
->msgh_trailer_type
= MACH_MSG_TRAILER_FORMAT_0
;
447 max_trailer
->msgh_trailer_size
= MACH_MSG_TRAILER_MINIMUM_SIZE
;
449 mr
= ipc_kmsg_copyin(kmsg
, space
, map
, MACH_PORT_NULL
);
450 if (mr
!= MACH_MSG_SUCCESS
) {
456 mr
= ipc_kmsg_send(kmsg
, MACH_MSG_OPTION_NONE
,
457 MACH_MSG_TIMEOUT_NONE
);
458 while (mr
== MACH_SEND_INTERRUPTED
);
459 assert(mr
== MACH_MSG_SUCCESS
);
462 if (option
& MACH_RCV_MSG
) {
463 thread_t self
= current_thread();
469 mr
= ipc_mqueue_copyin(space
, rcv_name
,
471 if (mr
!= MACH_MSG_SUCCESS
)
473 /* hold ref for object */
475 self
->ith_continuation
= (void (*)(mach_msg_return_t
))0;
476 ipc_mqueue_receive(mqueue
,
477 MACH_MSG_OPTION_NONE
,
479 MACH_MSG_TIMEOUT_NONE
,
481 mr
= self
->ith_state
;
482 kmsg
= self
->ith_kmsg
;
483 seqno
= self
->ith_seqno
;
485 ipc_object_release(object
);
487 } while (mr
== MACH_RCV_INTERRUPTED
);
488 if (mr
!= MACH_MSG_SUCCESS
)
491 trailer
= (mach_msg_max_trailer_t
*)
492 ((vm_offset_t
)kmsg
->ikm_header
+ kmsg
->ikm_header
->msgh_size
);
493 if (option
& MACH_RCV_TRAILER_MASK
) {
494 trailer
->msgh_seqno
= seqno
;
495 trailer
->msgh_context
=
496 kmsg
->ikm_header
->msgh_remote_port
->ip_context
;
497 trailer
->msgh_trailer_size
= REQUESTED_TRAILER_SIZE(option
);
500 if (rcv_size
< (kmsg
->ikm_header
->msgh_size
+ trailer
->msgh_trailer_size
)) {
501 ipc_kmsg_copyout_dest(kmsg
, space
);
502 (void) memcpy((void *) msg
, (const void *) kmsg
->ikm_header
, sizeof *msg
);
504 return MACH_RCV_TOO_LARGE
;
507 mr
= ipc_kmsg_copyout(kmsg
, space
, map
, MACH_PORT_NULL
,
509 if (mr
!= MACH_MSG_SUCCESS
) {
510 if ((mr
&~ MACH_MSG_MASK
) == MACH_RCV_BODY_ERROR
) {
511 ipc_kmsg_put_to_kernel(msg
, kmsg
,
512 kmsg
->ikm_header
->msgh_size
+ trailer
->msgh_trailer_size
);
514 ipc_kmsg_copyout_dest(kmsg
, space
);
515 (void) memcpy((void *) msg
, (const void *) kmsg
->ikm_header
, sizeof *msg
);
522 (void) memcpy((void *) msg
, (const void *) kmsg
->ikm_header
,
523 kmsg
->ikm_header
->msgh_size
+ trailer
->msgh_trailer_size
);
527 return MACH_MSG_SUCCESS
;
531 * Routine: mig_get_reply_port
533 * Called by client side interfaces living in the kernel
534 * to get a reply port.
537 mig_get_reply_port(void)
539 return (MACH_PORT_NULL
);
543 * Routine: mig_dealloc_reply_port
545 * Called by client side interfaces to get rid of a reply port.
549 mig_dealloc_reply_port(
550 __unused mach_port_t reply_port
)
555 * Routine: mig_put_reply_port
557 * Called by client side interfaces after each RPC to
558 * let the client recycle the reply port if it wishes.
562 __unused mach_port_t reply_port
)
567 * mig_strncpy.c - by Joshua Block
569 * mig_strncp -- Bounded string copy. Does what the library routine strncpy
570 * OUGHT to do: Copies the (null terminated) string in src into dest, a
571 * buffer of length len. Assures that the copy is still null terminated
572 * and doesn't overflow the buffer, truncating the copy if necessary.
576 * dest - Pointer to destination buffer.
578 * src - Pointer to source string.
580 * len - Length of destination buffer.
593 for (i
=1; i
<len
; i
++)
594 if (! (*dest
++ = *src
++))
605 return (char *)kalloc(size
);
617 * Routine: mig_object_init
619 * Initialize the base class portion of a MIG object. We
620 * will lazy init the port, so just clear it for now.
624 mig_object_t mig_object
,
625 const IMIGObject
*interface
)
627 if (mig_object
== MIG_OBJECT_NULL
)
628 return KERN_INVALID_ARGUMENT
;
629 mig_object
->pVtbl
= (const IMIGObjectVtbl
*)interface
;
630 mig_object
->port
= MACH_PORT_NULL
;
635 * Routine: mig_object_destroy
637 * The object is being freed. This call lets us clean
638 * up any state we have have built up over the object's
641 * Since notifications and the port hold references on
642 * on the object, neither can exist when this is called.
643 * This is a good place to assert() that condition.
647 __assert_only mig_object_t mig_object
)
649 assert(mig_object
->port
== MACH_PORT_NULL
);
654 * Routine: mig_object_reference
656 * Pure virtual helper to invoke the MIG object's AddRef
659 * MIG object port may be locked.
662 mig_object_reference(
663 mig_object_t mig_object
)
665 assert(mig_object
!= MIG_OBJECT_NULL
);
666 mig_object
->pVtbl
->AddRef((IMIGObject
*)mig_object
);
670 * Routine: mig_object_deallocate
672 * Pure virtual helper to invoke the MIG object's Release
678 mig_object_deallocate(
679 mig_object_t mig_object
)
681 assert(mig_object
!= MIG_OBJECT_NULL
);
682 mig_object
->pVtbl
->Release((IMIGObject
*)mig_object
);
686 * Routine: convert_mig_object_to_port [interface]
688 * Base implementation of MIG outtrans routine to convert from
689 * a mig object reference to a new send right on the object's
690 * port. The object reference is consumed.
692 * IP_NULL - Null MIG object supplied
693 * Otherwise, a newly made send right for the port
698 convert_mig_object_to_port(
699 mig_object_t mig_object
)
702 boolean_t deallocate
= TRUE
;
704 if (mig_object
== MIG_OBJECT_NULL
)
707 port
= mig_object
->port
;
708 while ((port
== IP_NULL
) ||
709 ((port
= ipc_port_make_send(port
)) == IP_NULL
)) {
713 * Either the port was never set up, or it was just
714 * deallocated out from under us by the no-senders
715 * processing. In either case, we must:
716 * Attempt to make one
717 * Arrange for no senders
718 * Try to atomically register it with the object
719 * Destroy it if we are raced.
721 port
= ipc_port_alloc_kernel();
723 ipc_kobject_set_atomically(port
,
724 (ipc_kobject_t
) mig_object
,
727 /* make a sonce right for the notification */
731 ipc_port_nsrequest(port
, 1, port
, &previous
);
734 assert(previous
== IP_NULL
);
736 if (OSCompareAndSwapPtr((void *)IP_NULL
, (void *)port
,
737 (void * volatile *)&mig_object
->port
)) {
740 ipc_port_dealloc_kernel(port
);
741 port
= mig_object
->port
;
746 mig_object
->pVtbl
->Release((IMIGObject
*)mig_object
);
753 * Routine: convert_port_to_mig_object [interface]
755 * Base implementation of MIG intrans routine to convert from
756 * an incoming port reference to a new reference on the
757 * underlying object. A new reference must be created, because
758 * the port's reference could go away asynchronously.
760 * NULL - Not an active MIG object port or iid not supported
761 * Otherwise, a reference to the underlying MIG interface
766 convert_port_to_mig_object(
770 mig_object_t mig_object
;
777 if (!ip_active(port
) || (ip_kotype(port
) != IKOT_MIG
)) {
783 * Our port points to some MIG object interface. Now
784 * query it to get a reference to the desired interface.
787 mig_object
= (mig_object_t
)port
->ip_kobject
;
788 mig_object
->pVtbl
->QueryInterface((IMIGObject
*)mig_object
, iid
, &ppv
);
790 return (mig_object_t
)ppv
;
794 * Routine: mig_object_no_senders [interface]
796 * Base implementation of a no-senders notification handler
797 * for MIG objects. If there truly are no more senders, must
798 * destroy the port and drop its reference on the object.
800 * TRUE - port deallocate and reference dropped
801 * FALSE - more senders arrived, re-registered for notification
807 mig_object_no_senders(
809 mach_port_mscount_t mscount
)
811 mig_object_t mig_object
;
814 if (port
->ip_mscount
> mscount
) {
818 * Somebody created new send rights while the
819 * notification was in-flight. Just create a
820 * new send-once right and re-register with
821 * the new (higher) mscount threshold.
823 /* make a sonce right for the notification */
826 ipc_port_nsrequest(port
, mscount
, port
, &previous
);
829 assert(previous
== IP_NULL
);
834 * Clear the port pointer while we have it locked.
836 mig_object
= (mig_object_t
)port
->ip_kobject
;
837 mig_object
->port
= IP_NULL
;
840 * Bring the sequence number and mscount in
841 * line with ipc_port_destroy assertion.
843 port
->ip_mscount
= 0;
844 port
->ip_messages
.imq_seqno
= 0;
845 ipc_port_destroy(port
); /* releases lock */
848 * Release the port's reference on the object.
850 mig_object
->pVtbl
->Release((IMIGObject
*)mig_object
);
855 * Kernel implementation of the notification chain for MIG object
856 * is kept separate from the actual objects, since there are expected
857 * to be much fewer of them than actual objects.
859 * The implementation of this part of MIG objects is coming
860 * "Real Soon Now"(TM).