lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 04 Nov 2006 16:12:42 -0800
From:	Matt Helsley <matthltc@...ibm.com>
To:	dwalker@...sta.com
Cc:	Linux-Kernel <linux-kernel@...r.kernel.org>,
	Jes Sorensen <jes@....com>,
	LSE-Tech <lse-tech@...ts.sourceforge.net>,
	Chandra S Seetharaman <sekharan@...ibm.com>,
	Christoph Hellwig <hch@....de>,
	Al Viro <viro@...iv.linux.org.uk>,
	Steve Grubb <sgrubb@...hat.com>, linux-audit@...hat.com,
	Paul Jackson <pj@....com>, Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH 1/9] Task Watchers v2: Task watchers v2

On Fri, 2006-11-03 at 17:13 -0800, Daniel Walker wrote:
> 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.

This is a good point -- it does look odd. I'm considering:

DEFINE_TASK_INITCALL(audit_alloc);

With others like:

DEFINE_TASK_EXITCALL()
DEFINE_TASK_CLONECALL()
etc.

That resembles other macros which create variables. Though I'm not sure
this patten is appropriate because these variables should not be used by
name.

Seems that no matter what something about it is going to be unusual. :)

> > 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

Thanks!

<snip>

Cheers,
	-Matt Helsley

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ