[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080926222147.GC10141@kroah.com>
Date: Fri, 26 Sep 2008 15:21:47 -0700
From: Greg KH <greg@...ah.com>
To: Eric Paris <eparis@...hat.com>
Cc: linux-kernel@...r.kernel.org, malware-list@...ts.printk.net
Subject: Re: [malware-list] [RFC 3/11] fanotify: fscking all notify, system
wide file access notification
On Fri, Sep 26, 2008 at 05:18:24PM -0400, Eric Paris wrote:
> diff --git a/fs/notify/fanotify.h b/fs/notify/fanotify.h
> new file mode 100644
> index 0000000..d6bc0c0
> --- /dev/null
> +++ b/fs/notify/fanotify.h
> @@ -0,0 +1,87 @@
> +#ifndef _LINUX_FANOTIFY_PRIVATE_H
> +#define _LINUX_FANOTIFY_PRIVATE_H
> +
> +#include <linux/fanotify.h>
> +
> +
> +#include <asm/atomic.h>
> +#include <linux/dcache.h>
> +#include <linux/list.h>
> +#include <linux/mutex.h>
> +#include <linux/path.h>
> +#include <linux/types.h>
> +#include <linux/wait.h>
<asm/> includes after <linux/> please.
> +
> +extern int check_notification_queue(struct fanotify_group *group);
> +extern void get_event(struct fanotify_event *event);
> +extern void put_event(struct fanotify_event *event);
> +extern int add_event_to_group_notification(struct fanotify_group *group, struct fanotify_event *event);
> +extern struct fanotify_event *remove_event_from_group_notification(struct fanotify_group *group);
> +extern struct fanotify_event *create_event(struct file *file, unsigned int mask);
> +extern struct fanotify_event_holder *alloc_event_holder(void);
> +extern void destroy_event_holder(struct fanotify_event_holder *holder);
Those are some pretty generic global function names (get_event?).
Please add a fanotify_ to the front of them to help developers
understand them and to not polute the global name space.
> +extern __init int fanotify_notification_init(void);
> +extern __init int fanotify_notification_uninit(void);
> +
> +extern void fanotify_get_group(struct fanotify_group *group);
> +extern void fanotify_put_group(struct fanotify_group *group);
> +extern int fanotify_register_group(char *name, unsigned int mask);
> +extern int fanotify_unregister_group(char *name, unsigned int mask);
Like you did here nicely :)
> +DEFINE_MUTEX(groups_mutex);
> +struct srcu_struct groups_srcu_struct;
> +LIST_HEAD(groups);
Again with the generic global symbol names.
thanks,
greg k-h
--
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