On Fri, 2008-09-26 at 22:34 +0100, Alan Cox wrote:
you don't, you create a new one and unregister the old one if you want
something different. There is no limit on the number of groups and
registered groups with nothing actively sitting there with the
notification file open have very minimal performance hit.
I took great care in making sure the interface and the implementation
were cleanly separated. Heck, they are even in different _user files.
I clearly remembered gregkh hating me passing binary blobs and you
suggested syscalls. This interface was to be easily extended, quickly
prototyped, and eventually thrown away for something the list likes.
The main goal was to make sure all communication was unidirectional and
race free. A very similar interface with syscalls could use
fanotify_control (need to think about it, register/unregister)
fd = fanotify_get_notify(%[buffer for string of metadata])
error = fanotify_send_mesg(access/fastpath, value, cookie, fd)
You're suggesting a malicious program attached to a listener? Yeah,
they can do horrible things to your machine. My thoughts were these
files are root only and selinux can easily control who can read/write
from them....
not sure what you meant by part 1. ACCESS events require an immediate
answer. If you want to batch up some write events and scan it with
another process that's fine. Pass your fd to that other process and
remember the pid of that other process. Every time you get an event
from that other process just allow it. That other process should not
have trouble adding the fastpath entry itself.
I thought we fixed mmap updates mtime a while back. I'll test and make
sure. That would throw a huge wrench in the works...
shooting for an lwn quote of the week?
The socket model you describe works very well and cleanly to replace the
'notification' part, but I can't think offhand how to send information
nearly as cleanly back. I guess we replace writing to access and
fastpath with setsockopt? Now how to make those easily extensible.....
As an aside I'm trying to get some quick and dirty perf numbers. My
scsi driver isn't loading on my test machine with hand built kernel so I
might not have any numbers till monday.
-Eric
--