From owner-p4-projects@FreeBSD.ORG Fri Sep 23 20:05:55 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 3A89D16A421; Fri, 23 Sep 2005 20:05:55 +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 F277816A41F for ; Fri, 23 Sep 2005 20:05:54 +0000 (GMT) (envelope-from deker@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C002543D45 for ; Fri, 23 Sep 2005 20:05:54 +0000 (GMT) (envelope-from deker@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 j8NK5s94015168 for ; Fri, 23 Sep 2005 20:05:54 GMT (envelope-from deker@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j8NK5skg015165 for perforce@freebsd.org; Fri, 23 Sep 2005 20:05:54 GMT (envelope-from deker@FreeBSD.org) Date: Fri, 23 Sep 2005 20:05:54 GMT Message-Id: <200509232005.j8NK5skg015165@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to deker@FreeBSD.org using -f From: Rob Deker To: Perforce Change Reviews Cc: Subject: PERFORCE change 84178 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, 23 Sep 2005 20:05:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=84178 Change 84178 by deker@deker_ibook.columbia.sparta.com on 2005/09/23 20:05:09 Addition of comments about SEDarwin changes to message.h Affected files ... .. //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/mach/message.h#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin7/src/darwin/xnu/osfmk/mach/message.h#5 (text+ko) ==== @@ -337,6 +337,11 @@ mach_port_name_t sender; } msg_labels_t; +/* + Trailer type to pass MAC policy label info as a mach message trailer. + +*/ + typedef struct { mach_msg_trailer_type_t msgh_trailer_type; @@ -527,6 +532,14 @@ #define MACH_RCV_TRAILER_MASK ((0xff << 24)) #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 +*/ #define REQUESTED_TRAILER_SIZE(y) \ ((mach_msg_trailer_size_t) \ ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \ @@ -537,7 +550,7 @@ sizeof(mach_msg_security_trailer_t) : \ ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ? \ sizeof(mach_msg_audit_trailer_t) : \ - sizeof(mach_msg_max_trailer_t)))))) + sizeof(mach_msg_max_trailer_t))))) /* * Much code assumes that mach_msg_return_t == kern_return_t.