PERFORCE change 84545 for review
Todd Miller
millert at FreeBSD.org
Fri Sep 30 13:04:45 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=84545
Change 84545 by millert at millert_g4tower on 2005/09/30 13:03:55
Further clarification of MACH_RCV_TRAILER_AV and MACH_RCV_TRAILER_LABELS
gotchas.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/mach/message.h#7 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/mach/message.h#7 (text+ko) ====
@@ -519,6 +519,11 @@
* NOTE: a 0x00------ RCV mask implies to ask for
* a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements,
* which is equivalent to a mach_msg_trailer_t.
+ *
+ * XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS
+ * and MACH_RCV_TRAILER_AV need their own private bit since we only calculate
+ * their fields when absolutely required. This will cause us problems if
+ * Apple adds new trailers.
*/
#define MACH_RCV_TRAILER_NULL 0
#define MACH_RCV_TRAILER_SEQNO 1
@@ -534,12 +539,13 @@
#define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf)
/*
- It should be noted here that in the case of MACH_RCV_TRAILER_AV,
- we just fall through to mach_msg_max_trailer_t. This is correct
- behavior since mach_msg_max_trailer_t is defined as mac_msg_mac_trailer_t
- which is used for the AV trailer. At some point this code should be
- updated to clarify this case. -d
-*/
+ * XXXMAC: note that in the case of MACH_RCV_TRAILER_AV and
+ * MACH_RCV_TRAILER_LABELS, we just fall through to mach_msg_max_trailer_t.
+ * This is correct behavior since mach_msg_max_trailer_t is defined as
+ * mac_msg_mac_trailer_t which is used for the LABELS and AV trailers.
+ * It also makes things work properly if MACH_RCV_TRAILER_AV or
+ * MACH_RCV_TRAILER_LABELS are ORed with one of the other options.
+ */
#define REQUESTED_TRAILER_SIZE(y) \
((mach_msg_trailer_size_t) \
((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list