mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Love <rml@novell.com>
To: "Timothy R. Chavez" <chavezt@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch] inotify for 2.6.11
Date: Fri, 04 Mar 2005 16:40:33 -0500	[thread overview]
Message-ID: <1109972433.4526.14.camel@betsy.boston.ximian.com> (raw)
In-Reply-To: <f2833c7605030413386a61ecb0@mail.gmail.com>

On Fri, 2005-03-04 at 15:38 -0600, Timothy R. Chavez wrote:

Hi, Mr. Chavez.

> Are there plans of reworking the "generic" hooking infrastructure
> (fsnotify.h) to be more like the security hooking framework (+
> stacking)?  I think it'd be nice to be able to have a fs_notify struct
> of function pointers, point at the one's I've chosen to implement, and
> then register / unregister with the framework.  Maybe this is an
> overly complicated approach, but these don't seem like they're generic
> hooks in anyway.

Personally, I think it is overkill.  I don't think we are going to have
the myriad of file notification systems that we have for security layers
(indeed, the goal is to have just inotify).

That said, we could always make the layer more pluggable once inotify is
in.  I would not fight that.  But, personally I don't see any real
benefit, just additional complexity and overhead.

> + * include/linux/fs_notify.h - >generic< hooks for filesystem notification, to
> + * reduce in-source duplication from both >dnotify and inotify<.
> 
> I guess I don't fully understand that comment.  Just quickly glancing
> at it, all you've done is added a level of indirection and shifted the
> same redundant code from the VFS to fs_notify.h -- Please correct me
> if I'm wrong (not at all uncommon).

No, you are right.  The "generic" part is supposed to be what is in the
VFS.  E.g., the fsnotify_foo() calls are supposed to be the generic
interface.

The body of these calls, as you can see, is static code, a simple copy
and cleanup of the inotify + dnotify hooks.

The idea, spurred by Christoph Hellwig's suggestion, was to keep the VFS
clean.  Not make a super neat pluggable notification system.  I think
the layers ARE generic, though, in the sense that foonotify could
probably drop some static code into fsnotify.h and work.

> As you already know, there's work being done on the audit subsystem
> that also needs notifications from the filesystem and would require
> yet another set of hooks.  However, where we get notified might differ
> from where inotify and dnotify get notified and it seems like
> fs_notify is tailored specifically for inotify (and accommodates
> dnotify out of obligation) and openly implements the "generic" hooks
> it requires.
> 
> Regardless, if this is the way it's going to be done.  We'll expand
> fs_notify.h to meet our needs as well.

If we end up duplicating stuff and making a big mess, then the audit
layer and the notification layer should DEFINITELY look at merging and
consolidating.  But I think that we need to wait until one or the other
gets more traction and into the mainline kernel.

> Also, FYI: 
> I just purchased the 2nd edition of your book, looking forward to reading it.

Great.  Hope you enjoy it!  ;-)

Best,

	Robert Love



  reply	other threads:[~2005-03-04 23:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-04 18:37 Robert Love
2005-03-04 19:11 ` [patch] inotify for 2.6.11-mm1 Robert Love
2005-03-07  1:19   ` Christoph Hellwig
2005-03-07  1:38     ` Andrew Morton
2005-03-07 21:27     ` [patch] inotify for 2.6.11-mm1, updated Robert Love
2005-03-08  4:40       ` Christoph Hellwig
2005-03-08  4:50         ` Robert Love
2005-03-08 17:08           ` Robert Love
2005-03-04 21:38 ` [patch] inotify for 2.6.11 Timothy R. Chavez
2005-03-04 21:40   ` Robert Love [this message]
2005-03-06  0:04 ` Christoph Hellwig
2005-03-06  0:40   ` Robert Love
2005-03-07  1:23     ` Christoph Hellwig
2005-03-07  4:33       ` Robert Love
2005-03-07 21:25 ` [patch] inotify for 2.6.11, updated Robert Love
2005-04-05  7:58 ` [patch] inotify for 2.6.11 Prakash Punnoor
2005-04-05 16:12   ` Robert Love
2005-04-05 17:20     ` Prakash Punnoor
2005-04-05 17:35       ` Robert Love
2005-04-05 22:09       ` Robert Love
2005-04-06  3:21       ` Adam Kropelin
2005-04-10 16:16 ` Erik Meitner
2005-03-07  3:13 Albert Cahalan
2005-03-08  1:00 ` Arnd Bergmann
     [not found] <3EqlI-2DI-59@gated-at.bofh.it>
     [not found] ` <3PRs6-89U-15@gated-at.bofh.it>
     [not found]   ` <3PYWC-636-7@gated-at.bofh.it>
     [not found]     ` <3Q0F6-7Ar-37@gated-at.bofh.it>
     [not found]       ` <3Q4z0-2tA-15@gated-at.bofh.it>
     [not found]         ` <pan.2005.04.06.00.53.44.705260@intel.com>
2005-04-06  1:21           ` Robert Love
     [not found] <3Q7wT-4HJ-11@gated-at.bofh.it>
     [not found] ` <3Q7wT-4HJ-13@gated-at.bofh.it>
     [not found]   ` <3Q7wT-4HJ-15@gated-at.bofh.it>
     [not found]     ` <3Q7wT-4HJ-17@gated-at.bofh.it>
     [not found]       ` <3Q7wT-4HJ-19@gated-at.bofh.it>
     [not found]         ` <3Q7wT-4HJ-21@gated-at.bofh.it>
     [not found]           ` <3Q7wT-4HJ-9@gated-at.bofh.it>
     [not found]             ` <pan.2005.04.08.01.37.42.462474@intel.com>
2005-04-08  1:52               ` Robert Love

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=1109972433.4526.14.camel@betsy.boston.ximian.com \
    --to=rml@novell.com \
    --cc=chavezt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®