From owner-p4-projects@FreeBSD.ORG Wed Aug 5 19:18:48 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8ED081065670; Wed, 5 Aug 2009 19:18:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D280106564A for ; Wed, 5 Aug 2009 19:18:48 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3AE268FC13 for ; Wed, 5 Aug 2009 19:18:48 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n75JImq9089975 for ; Wed, 5 Aug 2009 19:18:48 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n75JImbT089973 for perforce@freebsd.org; Wed, 5 Aug 2009 19:18:48 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 5 Aug 2009 19:18:48 GMT Message-Id: <200908051918.n75JImbT089973@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 167046 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2009 19:18:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=167046 Change 167046 by rwatson@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) {