diff options
author | Paul Moore <paul.moore@hp.com> | 2008-10-10 14:16:33 (GMT) |
---|---|---|
committer | Paul Moore <paul.moore@hp.com> | 2008-10-10 14:16:33 (GMT) |
commit | 6c5b3fc0147f79d714d2fe748b5869d7892ef2e7 (patch) | |
tree | 2cff691b2d4da2afd69660cb4ee647f6b553cdf9 /security/selinux/include/objsec.h | |
parent | 014ab19a69c325f52d7bae54ceeda73d6307ae0c (diff) | |
download | linux-fsl-qoriq-6c5b3fc0147f79d714d2fe748b5869d7892ef2e7.tar.xz |
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/objsec.h')
-rw-r--r-- | security/selinux/include/objsec.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index ad34787..f8be8d7 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -109,9 +109,6 @@ struct netport_security_struct { }; struct sk_security_struct { - u32 sid; /* SID of this object */ - u32 peer_sid; /* SID of peer */ - u16 sclass; /* sock security class */ #ifdef CONFIG_NETLABEL enum { /* NetLabel state */ NLBL_UNSET = 0, @@ -120,7 +117,11 @@ struct sk_security_struct { NLBL_REQSKB, NLBL_CONNLABELED, } nlbl_state; + struct netlbl_lsm_secattr *nlbl_secattr; /* NetLabel sec attributes */ #endif + u32 sid; /* SID of this object */ + u32 peer_sid; /* SID of peer */ + u16 sclass; /* sock security class */ }; struct key_security_struct { |