Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2005 20:05:54 GMT
From:      Rob Deker <deker@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 84178 for review
Message-ID:  <200509232005.j8NK5skg015165@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509232005.j8NK5skg015165>