public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rüdiger Klaehn" <rudi@gamemakers.de>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC,PATCH] dnotify: enhance or replace?
Date: Fri, 26 Mar 2004 11:12:01 +0100	[thread overview]
Message-ID: <406401F1.1050201@gamemakers.de> (raw)
In-Reply-To: <20040324200443.GS31500@parcelfarce.linux.theplanet.co.uk>

viro@parcelfarce.linux.theplanet.co.uk wrote:

[snip]

 > "Doctor, It Hurts When I Do It"
 >
 > Seriously, dnotify sucks in a lot of ways, starting with the basic
 > premise - that userland can do notification-based maintainig of directory
 > tree image.  It's racy by definition, so any attempts to use it for
 > "security improvements" are scam.  Which leaves us with file manglers
 > and their ilk.
 >
I thought about this some more. If you watch for e.g. all writes on the 
root of a file system you get a complete, correctly ordered log of all 
file writes on that filesystem. So you can find out wether a certain 
file has been changed or not. That could be relevant security information.

You would get changes to the file pointed to by the path /etc/shadow, 
even if the file has been changed by a hard link from /tmp/bla.

I am assuming here that there is a way like inode numbers to uniquely 
identify and persistently identify a file. If something like this does 
not exist, you are out of luck.

 > Note that any attempts to trace "aliases" in userland are hopelessly 
racy;

You don't trace aliases in userland. All the relevant information is 
logged in kernel space. The only thing you do in userspace is to convert 
this information into a user readable form. You can take as long as you 
want for that.

Btw: why did you put aliases in quotes? Is aliases not the correct term 
when refering to multiple paths pointing to the same file?

 > that mounting/unmounting doesn't even show on the radar;

There is an event for mounting and unmounting.

 > hat different users can see different parts of tree or, while we are
 > at it, completely different trees;
 >
That is why the paths returned by the mechanism are relative to the 
directory from which you watch.

 > that this crap is a DDoS on a server that exports any
 > sort of network filesystem to many clients - *especially* if you want
 > notifications on the entire tree.
 >
If you have 100 clients, and each client wants its own notification for 
/home, you would indeed have a problem. But if a single process like fam 
watches for changes in /home on behalf of all 100 clients, it would be 
no problem.

 > IOW, idea is fundamentally flawed and IMO the real fix is to try and 
figure
 > out a decent UI that would provide what file managers are really used 
for.
 >
File managers are just one application of an enhanced file change 
notification mechanism. There are many much more interesting 
applications. For file managers the current dnotify mechanism is OK.

      reply	other threads:[~2004-03-26 10:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-24 14:17 [RFC,PATCH] dnotify: enhance or replace? Rüdiger Klaehn
2004-03-24 15:40 ` Alexander Larsson
2004-03-24 16:15   ` Rüdiger Klaehn
     [not found]     ` <1080202140.8108.101.camel@localhost.localdomain>
2004-03-26  9:52       ` Rüdiger Klaehn
     [not found]       ` <4062C63F.6050907@gamemakers.de>
     [not found]         ` <1080219862.8108.138.camel@localhost.localdomain>
2004-03-26  9:59           ` Rüdiger Klaehn
2004-03-24 16:37   ` John McCutchan
2004-03-24 16:54     ` Rüdiger Klaehn
2004-03-24 19:53       ` John McCutchan
2004-03-24 20:00         ` Paul Rolland
2004-03-24 20:04         ` viro
2004-03-26 10:12           ` Rüdiger Klaehn [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=406401F1.1050201@gamemakers.de \
    --to=rudi@gamemakers.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rudi@lambda-computing.de \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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