summaryrefslogtreecommitdiff
path: root/security/smack/smack.h
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2018-11-20 22:55:02 +0300
committerKees Cook <keescook@chromium.org>2019-01-09 00:18:45 +0300
commitecd5f82e05ddd9b06c258167ec7467ac79741d77 (patch)
tree9cefea64fc40202a284fcb07ecf50f871f7562b0 /security/smack/smack.h
parent019bcca4626a9ed119e1d9ebfadb9fdbdcf9b35b (diff)
downloadlinux-ecd5f82e05ddd9b06c258167ec7467ac79741d77.tar.xz
LSM: Infrastructure management of the ipc security blob
Move management of the kern_ipc_perm->security and msg_msg->security blobs out of the individual security modules and into the security infrastructure. Instead of allocating the blobs from within the modules the modules tell the infrastructure how much space is required, and the space is allocated there. Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> Reviewed-by: Kees Cook <keescook@chromium.org> [kees: adjusted for ordered init series] Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r--security/smack/smack.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h
index 0adddbeecc62..9c7c95a5c497 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -376,12 +376,12 @@ static inline struct inode_smack *smack_inode(const struct inode *inode)
static inline struct smack_known **smack_msg_msg(const struct msg_msg *msg)
{
- return (struct smack_known **)&msg->security;
+ return msg->security + smack_blob_sizes.lbs_msg_msg;
}
static inline struct smack_known **smack_ipc(const struct kern_ipc_perm *ipc)
{
- return (struct smack_known **)&ipc->security;
+ return ipc->security + smack_blob_sizes.lbs_ipc;
}
/*