selinux: Cache NetLabel secattrs in the socket's security struct
authorPaul Moore <paul.moore@hp.com>
Fri, 10 Oct 2008 14:16:33 +0000 (10:16 -0400)
committerPaul Moore <paul.moore@hp.com>
Fri, 10 Oct 2008 14:16:33 +0000 (10:16 -0400)
commit6c5b3fc0147f79d714d2fe748b5869d7892ef2e7
tree2cff691b2d4da2afd69660cb4ee647f6b553cdf9
parent014ab19a69c325f52d7bae54ceeda73d6307ae0c
selinux: Cache NetLabel secattrs in the socket's security struct

Previous work enabled the use of address based NetLabel selectors, which
while highly useful, brought the potential for additional per-packet overhead
when used.  This patch attempts to mitigate some of that overhead by caching
the NetLabel security attribute struct within the SELinux socket security
structure.  This should help eliminate the need to recreate the NetLabel
secattr structure for each packet resulting in less overhead.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: James Morris <jmorris@namei.org>
security/selinux/hooks.c
security/selinux/include/netlabel.h
security/selinux/include/objsec.h
security/selinux/netlabel.c