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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071005054952.GC4893@in.ibm.com>
Date:	Fri, 5 Oct 2007 11:19:52 +0530
From:	Vivek Goyal <vgoyal@...ibm.com>
To:	Takenori Nagano <t-nagano@...jp.nec.com>
Cc:	linux-kernel@...r.kernel.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	k-miyoshi@...jp.nec.com, kexec@...ts.infradead.org,
	Bernhard Walle <bwalle@...e.de>, Keith Owens <kaos@....com.au>,
	Andrew Morton <akpm@...ux-foundation.org>, kdb@....sgi.com
Subject: Re: [PATCH 2/2] implement new notifier function to panic_notifier_list

On Thu, Oct 04, 2007 at 08:38:50PM +0900, Takenori Nagano wrote:
> This patch implements new notifier function to panic_notifier_list. We can
> change the list of order by debugfs.
> 
> Thanks,
> 
> ---
> 
> Signed-off-by: Takenori Nagano <t-nagano@...jp.nec.com>
> 
> ---
> diff -uprN linux-2.6.23-rc9.orig/arch/alpha/kernel/setup.c
> linux-2.6.23-rc9/arch/alpha/kernel/setup.c
> --- linux-2.6.23-rc9.orig/arch/alpha/kernel/setup.c	2007-10-02
> 12:24:52.000000000 +0900
> +++ linux-2.6.23-rc9/arch/alpha/kernel/setup.c	2007-10-04 09:49:34.440000000 +0900
> @@ -45,14 +45,22 @@
>  #include <asm/io.h>
>  #include <linux/log2.h>
> 
> -extern struct atomic_notifier_head panic_notifier_list;
> +extern struct tunable_notifier_head panic_notifier_list;
>  static int alpha_panic_event(struct notifier_block *, unsigned long, void *);
> -static struct notifier_block alpha_panic_block = {
> +static struct notifier_block alpha_panic_block_base = {
>  	alpha_panic_event,
>          NULL,
>          INT_MAX /* try to do it first */
>  };
> 
> +static struct tunable_notifier_block alpha_panic_block = {
> +	&alpha_panic_block_base,
> +	NULL,
> +	NULL,
> +	NULL,
> +	NULL
> +};
> +
>  #include <asm/uaccess.h>
>  #include <asm/pgtable.h>
>  #include <asm/system.h>
> @@ -522,8 +530,8 @@ setup_arch(char **cmdline_p)
>  	}
> 
>  	/* Register a call for panic conditions. */
> -	atomic_notifier_chain_register(&panic_notifier_list,
> -			&alpha_panic_block);
> +	tunable_notifier_chain_register(&panic_notifier_list,
> +			&alpha_panic_block, "alpha_panic", NULL);
> 

I think it might be good idea to somehow create provisions for another a
help string. This help string will inform admin that what a registered
user does? Ideally this should be visible in /sys/kernel/debug/<user module>/description file.

This kind of description can help admin to decide the priority among various
registered users withoug having to look at the source code.

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