From owner-p4-projects@FreeBSD.ORG Fri Sep 30 13:04:47 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0D07616A423; Fri, 30 Sep 2005 13:04:47 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B23D16A420 for ; Fri, 30 Sep 2005 13:04:46 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11A8643D53 for ; Fri, 30 Sep 2005 13:04:46 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j8UD4jor048263 for ; Fri, 30 Sep 2005 13:04:45 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8UD4j7O048260 for perforce@freebsd.org; Fri, 30 Sep 2005 13:04:45 GMT (envelope-from millert@freebsd.org) Date: Fri, 30 Sep 2005 13:04:45 GMT Message-Id: <200509301304.j8UD4j7O048260@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 84545 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 13:04:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=84545 Change 84545 by millert@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) ? \