> >No, hooks are not allowed to sleep :) Some might be, but you'd have to > >determine exactly which, and I decided it wasn't worth splitting up the > >hooks that way. At least not yet. > > Is that really so? That really limits the functionality one can implement > by using LSM hooks! Oh, no! Many hooks are allowed to sleep. I actually wanted to say that you can't assume they *won't* sleep, which is why you can't just do a simple rcu_read_lock(); list_for_each_entry_rcu() {call all hooks}; rcu_read_unlock(); as it sounds like you've found. But my approach performed pretty well on lmbench on a 4-way smp system, doing something like rcu_read_lock(); list_for_each_entry_rcu() { increment m->ref_count; rcu_read_unlock(); call m->hook(); rcu_read_lock(); decrement m->ref_count and free if necessary; } rcu_read_unlock(); What is the reason why the stacker on www.sf.net/projects/lsm-stacker does not suffice? -serge
This archive was generated by hypermail 2.1.3 : Wed Dec 22 2004 - 10:31:48 PST