linux/security
Eric Paris 6371dcd36f selinux: convert the policy type_attr_map to flex_array
Current selinux policy can have over 3000 types.  The type_attr_map in
policy is an array sized by the number of types times sizeof(struct ebitmap)
(12 on x86_64).  Basic math tells us the array is going to be of length
3000 x 12 = 36,000 bytes.  The largest 'safe' allocation on a long running
system is 16k.  Most of the time a 32k allocation will work.  But on long
running systems a 64k allocation (what we need) can fail quite regularly.
In order to deal with this I am converting the type_attr_map to use
flex_arrays.  Let the library code deal with breaking this into PAGE_SIZE
pieces.

-v2
rework some of the if(!obj) BUG() to be BUG_ON(!obj)
drop flex_array_put() calls and just use a _get() object directly

-v3
make apply to James' tree (drop the policydb_write changes)

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by:  Stephen D. Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2010-08-02 15:38:39 +10:00
..
apparmor AppArmor: Enable configuring and building of the AppArmor security module 2010-08-02 15:38:39 +10:00
integrity/ima ima: use generic_file_llseek for securityfs 2010-08-02 15:34:58 +10:00
keys KEYS: Reinstate lost passing of process keyring ID in call_sbin_request_key() 2010-08-02 15:34:56 +10:00
selinux selinux: convert the policy type_attr_map to flex_array 2010-08-02 15:38:39 +10:00
smack security: make LSMs explicitly mask off permissions 2010-08-02 15:35:07 +10:00
tomoyo TOMOYO: Use pathname specified by policy rather than execve() 2010-08-02 15:38:38 +10:00
Kconfig AppArmor: Enable configuring and building of the AppArmor security module 2010-08-02 15:38:34 +10:00
Makefile AppArmor: Enable configuring and building of the AppArmor security module 2010-08-02 15:38:34 +10:00
capability.c Security: capability: code style issue 2010-08-02 15:35:00 +10:00
commoncap.c security: whitespace coding style fixes 2010-04-23 10:10:23 +10:00
device_cgroup.c Merge branch 'master' into next 2010-05-06 10:56:07 +10:00
inode.c securityfs: Drop dentry reference count when mknod fails 2010-08-02 15:34:59 +10:00
lsm_audit.c Merge branch 'master' into next 2010-05-06 10:56:07 +10:00
min_addr.c mmap_min_addr check CAP_SYS_RAWIO only for write 2010-04-23 08:56:31 +10:00
security.c LSM: Remove unused arguments from security_path_truncate(). 2010-08-02 15:33:40 +10:00