linux-stable/security/smack
Casey Schaufler 4e328b0888 Smack: Create smack_rule cache to optimize memory usage
This patch allows for small memory optimization by creating the
kmem cache for "struct smack_rule" instead of using kzalloc.
For adding new smack rule, kzalloc is used to allocate the memory
for "struct smack_rule". kzalloc will always allocate 32 or 64 bytes
for 1 structure depending upon the kzalloc cache sizes available in
system. Although the size of structure is 20 bytes only, resulting
in memory wastage per object in the default pool.

For e.g., if there are 20000 rules, then it will save 240KB(20000*12)
which is crucial for small memory targets.

Signed-off-by: Vishal Goel <vishal.goel@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
2019-04-02 11:45:41 -07:00
..
Kconfig Smack: Signal delivery as an append operation 2016-09-08 13:22:56 -07:00
Makefile Smack: Repair netfilter dependency 2015-01-23 10:08:19 -08:00
smack.h Smack: Create smack_rule cache to optimize memory usage 2019-04-02 11:45:41 -07:00
smack_access.c LSM: generalize flag passing to security_capable 2019-01-10 14:16:06 -08:00
smack_lsm.c Smack: Create smack_rule cache to optimize memory usage 2019-04-02 11:45:41 -07:00
smack_netfilter.c netfilter: nf_hook_ops structs can be const 2017-07-31 19:10:44 +02:00
smackfs.c Smack: Create smack_rule cache to optimize memory usage 2019-04-02 11:45:41 -07:00