selinux: convert avtab hash table to flex_array
authorStephen Smalley <sds@tycho.nsa.gov>
Tue, 24 Mar 2015 20:54:16 +0000 (16:54 -0400)
committerPaul Moore <pmoore@redhat.com>
Tue, 7 Apr 2015 00:16:20 +0000 (20:16 -0400)
commitba39db6e0519aa8362dbda6523ceb69349a18dc3
tree0111ac00baee2c56dafd947f989264fa798b2c72
parentda8026fa0f9154b1c571c4d160dd51a7b8c34495
selinux: convert avtab hash table to flex_array

Previously we shrank the avtab max hash buckets to avoid
high order memory allocations, but this causes avtab lookups to
degenerate to very long linear searches for the Fedora policy. Convert to
using a flex_array instead so that we can increase the buckets
without such limitations.

This change does not alter the max hash buckets; that is left to a
separate follow-on change.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/ss/avtab.c
security/selinux/ss/avtab.h