summaryrefslogtreecommitdiff
path: root/security/selinux/include/netlabel.h
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2008-10-10 10:16:33 -0400
committerPaul Moore <paul.moore@hp.com>2008-10-10 10:16:33 -0400
commit6c5b3fc0147f79d714d2fe748b5869d7892ef2e7 (patch)
tree2cff691b2d4da2afd69660cb4ee647f6b553cdf9 /security/selinux/include/netlabel.h
parent014ab19a69c325f52d7bae54ceeda73d6307ae0c (diff)
downloadlinux-3.10-6c5b3fc0147f79d714d2fe748b5869d7892ef2e7.tar.gz
linux-3.10-6c5b3fc0147f79d714d2fe748b5869d7892ef2e7.tar.bz2
linux-3.10-6c5b3fc0147f79d714d2fe748b5869d7892ef2e7.zip
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>
Diffstat (limited to 'security/selinux/include/netlabel.h')
-rw-r--r--security/selinux/include/netlabel.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/security/selinux/include/netlabel.h b/security/selinux/include/netlabel.h
index 982bac0ac32..b913c8d0603 100644
--- a/security/selinux/include/netlabel.h
+++ b/security/selinux/include/netlabel.h
@@ -41,6 +41,7 @@ void selinux_netlbl_cache_invalidate(void);
void selinux_netlbl_err(struct sk_buff *skb, int error, int gateway);
+void selinux_netlbl_sk_security_free(struct sk_security_struct *ssec);
void selinux_netlbl_sk_security_reset(struct sk_security_struct *ssec,
int family);
@@ -77,6 +78,12 @@ static inline void selinux_netlbl_err(struct sk_buff *skb,
return;
}
+static inline void selinux_netlbl_sk_security_free(
+ struct sk_security_struct *ssec)
+{
+ return;
+}
+
static inline void selinux_netlbl_sk_security_reset(
struct sk_security_struct *ssec,
int family)