Re: [BUG] sysfs on 2.5.48 unable to remove files while in use

Werner Almesberger (wa@almesberger.net)
Sun, 24 Nov 2002 10:04:45 -0300


Patrick Mochel wrote:
> * This uses a sysfs control file to manage a list of probes.
> * The sysfs directory is at
> *
> * /sys/noisy/

I really like the idea of controlling kprobes through sysfs.
However, ...

> * A Noisy Probe can be added by echoing into the file, like:
> *
> * $ echo "add <address> <message>" > /sys/noisy/ctl

do you really need a "magic" file for this ? I don't know how
well sysfs supports mkdir/rmdir (if at all), but they would
seem to provide a much more natural interface. (VFS allows
rmdir to remove non-empty directories, so you wouldn't have
to rm -r.)

I don't think you need probe installation and message setting
to be atomic, so you could just assign a unique default
message, e.g. the probe address.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/