PERFORCE change 167046 for review

Robert Watson rwatson at FreeBSD.org
Wed Aug 5 19:18:49 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=167046

Change 167046 by rwatson at rwatson_cinnamon on 2009/08/05 19:17:49

	More comments.

Affected files ...

.. //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_worker.c#4 edit

Differences ...

==== //depot/projects/soc2009/marinosi_appaudit/src/sys/security/audit/audit_worker.c#4 (text) ====

@@ -75,7 +75,10 @@
 
 
 /*
- * Slice-worker private mtx handling macros
+ * Slice-worker private mtx handling macros.
+ *
+ * XXXRW: 'as' should be passed in as an explicit macro argument to avoid
+ * side effect semantics.
  */
 #define	AUDIT_WORKER_LOCK_INIT()	sx_init(&(as->audit_worker_lock), \
 					    "audit_worker_lock");
@@ -377,6 +380,10 @@
  *
  * Note: this means that the effect bound on the size of the pending record
  * queue is 2x the length of the global queue.
+ *
+ * XXXRW: The audit worker needs to detect when an audit slice is being shut
+ * down, and exit.  Perhaps using a state flag in struct audit_slice that is
+ * checked when waking up, or more probably, when going to sleep?
  */
 static void
 audit_worker(void *arg)
@@ -434,6 +441,9 @@
  * both should be NULL, and this is used to indicate that audit is being
  * disabled.  Any previous cred/vnode will be closed and freed.  We re-enable
  * generating rotation requests to auditd.
+ *
+ * XXXRW: We'd like to be able to rotate for slices other than
+ * audit_base_slice in the future, as well.
  */
 void
 audit_rotate_vnode(struct ucred *cred, struct vnode *vp)
@@ -473,6 +483,10 @@
 	}
 }
 
+/*
+ * XXXRW: Can replace void *arg with a simple audit_slice pointer now.
+ * Perhaps rename to audit_worker_start() and need an audit_worker_stop().
+ */
 void
 audit_worker_init(void *arg)
 {


More information about the p4-projects mailing list