calipso: Add a label cache.
authorHuw Davies <huw@codeweavers.com>
Mon, 27 Jun 2016 19:06:17 +0000 (15:06 -0400)
committerPaul Moore <paul@paul-moore.com>
Mon, 27 Jun 2016 19:06:17 +0000 (15:06 -0400)
commit4fee5242bf41d9ad641d4c1b821e36eb7ba37fbf
tree6b79290fc0dbeffe30945235ca86576b652c84dd
parent2e532b702834c07f614caf4489feb691e713232a
calipso: Add a label cache.

This works in exactly the same way as the CIPSO label cache.
The idea is to allow the lsm to cache the result of a secattr
lookup so that it doesn't need to perform the lookup for
every skbuff.

It introduces two sysctl controls:
 calipso_cache_enable - enables/disables the cache.
 calipso_cache_bucket_size - sets the size of a cache bucket.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/net/calipso.h
include/net/netlabel.h
net/ipv6/calipso.c
net/ipv6/sysctl_net_ipv6.c
net/netlabel/netlabel_calipso.c
net/netlabel/netlabel_calipso.h
net/netlabel/netlabel_kapi.c
security/selinux/netlabel.c