selinux: convert part of the sym_val_to_name array to use flex_array
authorEric Paris <eparis@redhat.com>
Mon, 29 Nov 2010 20:47:09 +0000 (15:47 -0500)
committerEric Paris <eparis@redhat.com>
Tue, 30 Nov 2010 22:28:58 +0000 (17:28 -0500)
commitac76c05becb6beedbb458d0827d3deaa6f479a72
tree255276b52f7b031671ae5948b39d7c92e50ba420
parent23bdecb000c806cf4ec52764499a600f7200d7a9
selinux: convert part of the sym_val_to_name array to use flex_array

The sym_val_to_name type array can be quite large as it grows linearly with
the number of types.  With known policies having over 5k types these
allocations are growing large enough that they are likely to fail.  Convert
those to flex_array so no allocation is larger than PAGE_SIZE

Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/ss/conditional.c
security/selinux/ss/mls.c
security/selinux/ss/policydb.c
security/selinux/ss/policydb.h
security/selinux/ss/services.c