From owner-p4-projects@FreeBSD.ORG Fri Jul 9 17:38:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 26DB016A4D0; Fri, 9 Jul 2004 17:38:56 +0000 (GMT) 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 0221216A4CE for ; Fri, 9 Jul 2004 17:38:56 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7A5443D1D for ; Fri, 9 Jul 2004 17:38:55 +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.12.11/8.12.11) with ESMTP id i69HctVR075957 for ; Fri, 9 Jul 2004 17:38:55 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i69Hct5p075954 for perforce@freebsd.org; Fri, 9 Jul 2004 17:38:55 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 9 Jul 2004 17:38:55 GMT Message-Id: <200407091738.i69Hct5p075954@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 Subject: PERFORCE change 56908 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 17:38:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=56908 Change 56908 by rwatson@rwatson_tislabs on 2004/07/09 17:38:28 Extend comment on label management interfaces. Move cleanup operations up to near init/destroy since they serve a similar function. Affected files ... .. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#213 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#213 (text+ko) ==== @@ -90,7 +90,10 @@ int (*mpo_syscall)(struct thread *td, int call, void *arg); /* - * Label operations. + * Label operations. Initialize label storage, destroy label + * storage, recycle for re-use without init/destroy, copy a label + * to initialized storage, and externalize/internalize from/to + * initialized storage. */ void (*mpo_init_bpfdesc_label)(struct label *label); void (*mpo_init_cred_label)(struct label *label); @@ -130,6 +133,10 @@ void (*mpo_destroy_posix_ksem_label)(struct label *label); void (*mpo_destroy_proc_label)(struct label *label); void (*mpo_destroy_vnode_label)(struct label *label); + void (*mpo_cleanup_ipc_msgmsg)(struct label *msglabel); + void (*mpo_cleanup_ipc_msgqueue)(struct label *msqlabel); + void (*mpo_cleanup_ipc_sema)(struct label *semalabel); + void (*mpo_cleanup_ipc_shm)(struct label *shmlabel); void (*mpo_copy_cred_label)(struct label *src, struct label *dest); void (*mpo_copy_mbuf_label)(struct label *src, @@ -327,20 +334,6 @@ struct label *newlabel); void (*mpo_thread_userret)(struct thread *thread); - /* - * Label cleanup operation: This is the inverse complement for the - * mac_create and associate type of hooks. This hook lets the policy - * module(s) perform a cleanup/flushing operation on the label - * associated with the objects, without freeing up the space allocated. - * This hook is useful in cases where it is desirable to remove any - * labeling reference when recycling any object to a pool. - * This hook does not replace the mac_destroy hooks. - */ - void (*mpo_cleanup_ipc_msgmsg)(struct label *msglabel); - void (*mpo_cleanup_ipc_msgqueue)(struct label *msqlabel); - void (*mpo_cleanup_ipc_sema)(struct label *semalabel); - void (*mpo_cleanup_ipc_shm)(struct label *shmlabel); - /* * Access control checks. */