From owner-trustedbsd-cvs@FreeBSD.ORG Sat Jul 8 10:26:55 2006 Return-Path: X-Original-To: trustedbsd-cvs@freebsd.org Delivered-To: trustedbsd-cvs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2296516A561 for ; Sat, 8 Jul 2006 10:26:55 +0000 (UTC) (envelope-from owner-perforce@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F2B243D49 for ; Sat, 8 Jul 2006 10:26:54 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by cyrus.watson.org (Postfix) with ESMTP id C1ADD46D03 for ; Sat, 8 Jul 2006 06:26:53 -0400 (EDT) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A583C5594D; Sat, 8 Jul 2006 10:26:52 +0000 (GMT) (envelope-from owner-perforce@freebsd.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CDF216A4DD; Sat, 8 Jul 2006 10:26:52 +0000 (UTC) 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 6316E16A4DE for ; Sat, 8 Jul 2006 10:26:52 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D87743D49 for ; Sat, 8 Jul 2006 10:26:52 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k68AQpPJ094030 for ; Sat, 8 Jul 2006 10:26:51 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k68AQpvu094024 for perforce@freebsd.org; Sat, 8 Jul 2006 10:26:51 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 8 Jul 2006 10:26:51 GMT Message-Id: <200607081026.k68AQpvu094024@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 100974 for review X-BeenThere: trustedbsd-cvs@FreeBSD.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: TrustedBSD CVS and Perforce commit message list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 10:26:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=100974 Change 100974 by rwatson@rwatson_zoo on 2006/07/08 10:26:20 Notes on mac2 branch. Affected files ... .. //depot/projects/trustedbsd/mac2/mac2_notes.txt#2 edit Differences ... ==== //depot/projects/trustedbsd/mac2/mac2_notes.txt#2 (text+ko) ==== @@ -1,1 +1,58 @@ Notes file for prototype changes made in the MAC2 branch. + +- Renaming of pretty much all entry points. Adopt a new naming scheme + based on: + + mpo__() + mpo__check_() + + Likewise for mac_*. This appears to shorten quite a few names + (removing '_from_', etc), and make things much more legible and + consistent. + +- Add a new subsystem class netinet to hold netinet-related methods. + +- Resort entry points in mac_framework.h, mac_policy.h by object rather + than method. This significantly improves readability. + +- Split mac.h into mac.h and mac_framework.h, breaking out user and kernel + APIs into separate kernel include files. + +Planned changes: + +- Accessor methods for slot data based on functions, in order to avoid + encoding the ABI of the slot/label mechanism into modules. Proposed + methods: + + mac__getlabel(mpc, object, &valuep); + mac__setlabel(mpc, object, value); + + These will get and set the slot field, which will be of type uintptr_t. + Locking will be unchanged. Policies will likely wrap these in their + own macro or inline to pass mpc implicitly in common use. + +- Remove label arguments from policy entry points where an accessor method + can be used. + +Already performed and merged changes: + +- Adopt SEDarwin MAC Framework change to provide mpo_foo_t prototypes for + mac_policy_ops entries. This has several advantages: + + Provide a more clear style and structure for inline documentation. + + Allow internal prototyping in policies so they can be broken into + multiple C files more easily. + +Future directions: + +- Break policy modules into multiple files by object/subsystem class, + with policy_internal.h using new mpo prototypes. + +- Explore and possibly adopt SEDarwin MAC Framework changes to allow + specific label registration for policy modules for FreeBSD. + +- Explore and possibly adopt fine-grained label registration so that slots + are only used for objects requested by the policy. I.e., policies can + request only a cred label slot, etc. This could then be used to key + memory allocation overhead on more objects.