From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Walker Subject: Re: [PATCH 1/9] Task Watchers v2: Task watchers v2 Date: Fri, 03 Nov 2006 08:22:34 -0500 Message-ID: <1162560154.2801.13.camel@localhost.localdomain> References: <20061103042257.274316000@us.ibm.com> <20061103042748.438619000@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20061103042748.438619000@us.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: lse-tech-bounces@lists.sourceforge.net Errors-To: lse-tech-bounces@lists.sourceforge.net To: Matt Helsley Cc: Andrew Morton , Chandra S Seetharaman , Jes Sorensen , Linux-Kernel , Paul Jackson , linux-audit@redhat.com, Al Viro , LSE-Tech , Steve Grubb , Christoph Hellwig List-Id: linux-audit@redhat.com On Thu, 2006-11-02 at 20:22 -0800, Matt Helsley wrote: > +/* > + * Watch for events occuring within a task and call the supplied > function > + * when (and only when) the given event happens. > + * Only non-modular kernel code may register functions as > task_watchers. > + */ > +#define task_watcher_func(ev, fn) \ > +static task_watcher_fn __task_watcher_##ev##_##fn __attribute_used__ > \ > + __attribute__ ((__section__ (".task_watchers." #ev))) = fn > +#else > +#error "task_watcher() macro may not be used in modules." > +#endif You should make this TASK_WATCHER_FUNC() or even just TASK_WATCHER(). It looks a little goofy in the code that uses it. Looking at it now could you do something like, static int __task_watcher_init audit_alloc(unsigned long val, struct task_struct *tsk) Instead of a macro? Might be a little less invasive. Daniel ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642