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]
Date:	Wed, 7 Feb 2007 14:27:17 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Srinivasa Ds <srinivasa@...ibm.com>
Cc:	Frederik Deweerdt <deweerdt@...e.fr>,
	Christoph Hellwig <hch@...radead.org>,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	jkenisto@...ibm.com, anil.s.keshavamurthy@...el.com,
	prasanna@...ibm.com, ananth@...ibm.com
Subject: Re: [RFC] [PATCH] To list all active probes in the system

On Wed, 07 Feb 2007 10:55:23 +0530
Srinivasa Ds <srinivasa@...ibm.com> wrote:

> --- linux-2.6.20.orig/fs/debugfs/inode.c
> +++ linux-2.6.20/fs/debugfs/inode.c
> @@ -25,6 +25,7 @@
>  #include <linux/namei.h>
>  #include <linux/debugfs.h>
>  #include <linux/fsnotify.h>
> +#include <linux/kprobes.h>
>  
>  #define DEBUGFS_MAGIC	0x64626720
>  
> @@ -320,6 +321,7 @@ static int __init debugfs_init(void)
>  	retval = register_filesystem(&debug_fs_type);
>  	if (retval)
>  		subsystem_unregister(&debug_subsys);
> +	debugfs_kprobe_init();
>  	return retval;
>  }

eww.  Didn't it feel bad when you did that?


As this module has a dependency upon debugfs, I'd have thought the
approproate way of expressing that would be to run debugfs_kprobe_init()
at a lower initcall priority than debugfs_init()

> +void __kprobes debugfs_kprobe_init(void)
> +{
> +	struct dentry *dir;
> +	
> +	dir = debugfs_create_dir("kprobes", NULL);
> +	if (dir == NULL)
> +		return;
> +	debugfs_create_file("list", 0444, dir , 0 , &proc_kprobes_operations);
> +}
> +
>  __initcall(init_kprobes);

debugfs_init() already runs at core_initcall level, presumably so that
debugfs clients can use plain old module_init().

> 
> +static inline void debugfs_kprobe_init(void)
> +{
> +}

In which case we don't need this.	
-
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