Date: Fri, 9 Jul 2004 17:38:55 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 56908 for review Message-ID: <200407091738.i69Hct5p075954@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407091738.i69Hct5p075954>