Re: [PATCH] SMACK netfilter smacklabel socket match

From: Paul Moore
Date: Wed Feb 18 2009 - 15:55:33 EST


On Wednesday 18 February 2009 02:35:00 pm etienne wrote:
> Casey Schaufler wrote:
> > Yes, it would make it nicer. You'll need to do a better job
> > on the list management than I've been doing. It's probably well
> > past time to introduce the Standard list management scheme to
> > Smack, and you'll need to do so if you want to do insertions
> > and/or deletions.
>
> well, we could maybe do that for smack_netlbladdrs.
> for smk_rules, i don't know, depending to the use case, it could grow
> bigger and thus need a more efficient scheme than linked-list like
> hash-table.

The code is easily changed because it is private to Smack and we don't have to
worry about backwards compatibility issues. I would focus on improving the
linked list approach (masked, sorted, etc.) and when traversing the list
becomes a bottleneck we can look at alternative approaches. Others may have a
better view, but from what I've seen the general approach taken in Linux
Kernel optimization is to develop something that works then refine and
optimize it once you have a better understanding of the common use cases.

--
paul moore
linux @ hp

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