Re: VFS event hooks

Richard Gooch (rgooch@atnf.csiro.au)
Wed, 30 Jun 1999 21:18:26 +1000


Pavel Machek writes:
> Hi!
>
> > It patches against 2.3.5 and 2.3.8. Currently only ext2fs directories
> > support inode change events, but it gives you the idea. I considered
> > hacking do_select() and do_poll() to call vfs_poll() directly, but
> > that would have introduced more tests to the critical path.
>
> Hmm -- does not this open DoS attack? What about users taking poll at
> _many_ directories and eating nonswappable ram this way? You seem to
> need to remember what last poll did, so something like
>
> poll("/usr")
> poll("/usr/src")
> poll("/usr/X11")

But it doesn't work this way. It looks like this:
fd1 = open ("/usr");
fd2 = open ("/usr/src");
fd3 = open ("/usr/X11");
poll (fd1...fd3);

So there's no denial of service. You may as well argue that open() is
a potential denial of service.

> ... here kernel needs to remember what I polled and when, because I c
> an do
>
> poll("/usr")
>
> again. This seems to me like pretty trivial attach.

Nope. Read the code.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/