From: Greg KH <greg@kroah.com>
To: Eric Paris <eparis@redhat.com>
Cc: linux-kernel@vger.kernel.org, malware-list@lists.printk.net
Subject: Re: [malware-list] [RFC 3/11] fanotify: fscking all notify, system wide file access notification
Date: Fri, 26 Sep 2008 15:21:47 -0700 [thread overview]
Message-ID: <20080926222147.GC10141@kroah.com> (raw)
In-Reply-To: <1222463904.2872.212.camel@localhost.localdomain>
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
prev parent reply other threads:[~2008-09-26 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 21:18 [RFC 3/11] fanotify: fscking all notify, system wide file access notification Eric Paris
2008-09-26 22:17 ` [malware-list] " Greg KH
2008-09-26 22:21 ` Greg KH [this message]
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=20080926222147.GC10141@kroah.com \
--to=greg@kroah.com \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=malware-list@lists.printk.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.