lsm: infrastructure management of the infiniband blob

Move management of the infiniband security blob out of the individual
security modules and into the LSM infrastructure.  The security modules
tell the infrastructure how much space they require at initialization.
There are no longer any modules that require the ib_free() hook.
The hook definition has been removed.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johansen@canonical.com>
[PM: subject tweak, selinux style fixes]
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
Casey Schaufler
2024-07-10 14:32:29 -07:00
committed by Paul Moore
parent a39c0f77db
commit 66de33a0bb
5 changed files with 25 additions and 17 deletions

View File

@@ -212,4 +212,9 @@ static inline struct tun_security_struct *selinux_tun_dev(void *security)
return security + selinux_blob_sizes.lbs_tun_dev;
}
static inline struct ib_security_struct *selinux_ib(void *ib_sec)
{
return ib_sec + selinux_blob_sizes.lbs_ib;
}
#endif /* _SELINUX_OBJSEC_H_ */