public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: Matt Helsley <matthltc@us.ibm.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
	Jes Sorensen <jes@sgi.com>,
	LSE-Tech <lse-tech@lists.sourceforge.net>,
	Chandra S Seetharaman <sekharan@us.ibm.com>,
	Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
	Steve Grubb <sgrubb@redhat.com>,
	linux-audit@redhat.com, Paul Jackson <pj@sgi.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/9] Task Watchers v2: Task watchers v2
Date: Fri, 03 Nov 2006 17:13:24 -0800	[thread overview]
Message-ID: <1162602805.12956.11.camel@dwalker1.mvista.com> (raw)
In-Reply-To: <1162600994.12419.397.camel@localhost.localdomain>

On Fri, 2006-11-03 at 16:43 -0800, Matt Helsley wrote:

> I can certainly change this. In my defense I didn't capitalize it
> because very similar macros in init.h were not capitalized. For example:
> 
> #define core_initcall(fn)               __define_initcall("1",fn)
> #define postcore_initcall(fn)           __define_initcall("2",fn)
> #define arch_initcall(fn)               __define_initcall("3",fn)
> #define subsys_initcall(fn)             __define_initcall("4",fn)
> #define fs_initcall(fn)                 __define_initcall("5",fn)
> #define device_initcall(fn)             __define_initcall("6",fn)
> #define late_initcall(fn)               __define_initcall("7",fn)
> 
> setup_param, early_param, module_init, etc. do not use all-caps. And I'm
> sure that's not all.

True .. It's not mandatory. The reason that I mentioned it is because it
looked like a function was being called outside a function block, which
looks odd to me. I think I overlook the initcall functions because I see
them so often I know what they are.

> All of these declare variables and assign them attributes and values.
> 
> > 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.
> 
> 	I like your suggestion. However, I don't see how such a macro could be
> made to replace the current macro.
> 
> 	I need to be able to call every init function during task
> initialization. The current macro creates and initializes a function
> pointer in an array in the special ELF section. This allows the
> notify_task_watchers function to traverse the array and make calls to
> the init functions.


You get an "A" for research. I didn't notice you actually declare a
variable inside the macro. I thought it was only setting a section
attribute. You right, I don't see how you could call the functions in
the section without the variable declared. ( besides that's exactly how
the initcalls work. )

Daniel


  reply	other threads:[~2006-11-04  1:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03  4:22 [PATCH 0/9] Task Watchers v2: Introduction Matt Helsley
2006-11-03  4:22 ` [PATCH 1/9] Task Watchers v2: Task watchers v2 Matt Helsley
2006-11-03 13:22   ` Daniel Walker
2006-11-04  0:43     ` Matt Helsley
2006-11-04  1:13       ` Daniel Walker [this message]
2006-11-05  0:12         ` Matt Helsley
2006-11-03  4:22 ` [PATCH 2/9] Task Watchers v2: Register audit task watcher Matt Helsley
2006-11-03  4:23 ` [PATCH 3/9] Task Watchers v2: Register semundo " Matt Helsley
2006-11-03  4:23 ` [PATCH 4/9] Task Watchers v2: Register cpuset " Matt Helsley
2006-11-03  4:23 ` [PATCH 5/9] Task Watchers v2: Register NUMA mempolicy " Matt Helsley
2006-11-03  4:23 ` [PATCH 6/9] Task Watchers v2: Register IRQ flag tracing " Matt Helsley
2006-11-03  4:23 ` [PATCH 7/9] Task Watchers v2: Register lockdep " Matt Helsley
2006-11-03  4:23 ` [PATCH 8/9] Task Watchers v2: Register process keyrings " Matt Helsley
2006-11-03  4:23 ` [PATCH 9/9] Task Watchers v2: Register process events connector Matt Helsley
2006-11-03  8:57 ` [PATCH 0/9] Task Watchers v2: Introduction Paul Jackson
2006-11-03 22:55   ` Matt Helsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1162602805.12956.11.camel@dwalker1.mvista.com \
    --to=dwalker@mvista.com \
    --cc=akpm@osdl.org \
    --cc=hch@lst.de \
    --cc=jes@sgi.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=matthltc@us.ibm.com \
    --cc=pj@sgi.com \
    --cc=sekharan@us.ibm.com \
    --cc=sgrubb@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox