On Tue, Oct 15, 2002 at 02:14:01PM -0400, Donald Becker wrote: > - Your method adds a bunch of hooks when just one would do. How would you propose a single hook? Specify the action in the hook? Linus has already rejected this idea :) > The usual approach is > if (obj->hookfun) obj->hookfun(obj, method_index, other_params); > > Even this makes the code less readable, but at least doesn't jump all > over the instruction space. The impact is a dereference and a test for > zero, and then a jump over a push/mov instructions for values that > should already be in registers. Linus has stated that he didn't want the check and then jump, but an unconditional jump (even if the function is nothing but a return.) I guess this is faster as the processor doesn't have to guess at branch prediction. That's why we built these calls in this way. That being said, a number of people have asked that the networking hooks be able to "be compiled away", so we will be glad to do this. thanks, greg k-h _______________________________________________ linux-security-module mailing list linux-security-moduleat_private http://mail.wirex.com/mailman/listinfo/linux-security-module
This archive was generated by hypermail 2b30 : Tue Oct 15 2002 - 12:17:38 PDT