This patch set depends on:
https://lore.kernel.org/linux-integrity/[email protected]/
https://lore.kernel.org/linux-integrity/[email protected]/
One of the challenges that must be tackled to move IMA and EVM to the LSM
infrastructure is to ensure that EVM is capable to correctly handle
multiple stacked LSMs providing an xattr at file creation. At the moment,
there are few issues that would prevent a correct integration. This patch
set aims at solving them.
From the LSM infrastructure side, the LSM stacking feature added the
possibility of registering multiple implementations of the security hooks,
that are called sequentially whenever someone calls the corresponding
security hook. However, security_inode_init_security() and
security_old_inode_init_security() are currently limited to support one
xattr provided by LSM and one by EVM.
In addition, using the call_int_hook() macro causes some issues. According
to the documentation in include/linux/lsm_hooks.h, it is a legitimate case
that an LSM returns -EOPNOTSUPP when it does not want to provide an xattr.
However, the loop defined in the macro would stop calling subsequent LSMs
if that happens. In the case of security_old_inode_init_security(), using
the macro would also cause a memory leak due to replacing the *value
pointer, if multiple LSMs provide an xattr.
From EVM side, the first operation to be done is to change the definition
of evm_inode_init_security() to be compatible with the security hook
definition. Unfortunately, the current definition does not provide enough
information for EVM, as it must have visibility of all xattrs provided by
LSMs to correctly calculate the HMAC. This patch set changes the security
hook definition by replacing the name, value and len triple with the xattr
array allocated by security_inode_init_security().
Secondly, EVM must know how many elements are in the xattr array. EVM can
rely on the fact that the xattr array must be terminated with an element
with name field set to NULL, but can also benefit from the enhancements
that have been included in this version of the patch set.
Casey suggested to use the reservation mechanism currently implemented for
other security blobs, for xattrs. In this way,
security_inode_init_security() can know after LSM initialization how many
slots for xattrs should be allocated, and LSMs know the offset in the
array from where they can start writing xattrs.
One of the problem was that LSMs can decide at run-time, although they
reserved a slot, to not use it (for example because they were not
initialized). Given that the initxattrs() method implemented by filesystems
expect that the array is continuous, they would miss the slots after the
one not being initialized. security_inode_init_security() should have been
modified to compact the array.
Instead, the preferred solution was to introduce the base slot as a
parameter, in addition to the xattr array, containing the up to date
information about the slots used by previous LSMs. The correctness of the
update of the slot is ensured by both the LSMs, if they use the new helper
lsm_find_xattr_slot(), and by security_inode_init_security() which checks
the slot each time after an LSM executes the inode_init_security hook.
This patch set has been tested by introducing several instances of a
TestLSM (some providing an xattr, some not, one with a wrong implementation
to see how the LSM infrastructure handles it). The patch is not included
in this set but it is available here:
https://github.com/robertosassu/linux/commit/c7e01af6cb2c6780f0b143070269fff7e30053f9
The test, added to ima-evm-utils, is available here:
https://github.com/robertosassu/ima-evm-utils/blob/evm-multiple-lsms-v3-devel-v7/tests/evm_multiple_lsms.test
The test takes a UML kernel built by Travis and launches it several times,
each time with a different combination of LSMs. After boot, it first checks
that there is an xattr for each LSM providing it, and then calculates the
HMAC in user space and compares it with the HMAC calculated by EVM in
kernel space.
A test report can be obtained here:
https://travis-ci.com/github/robertosassu/ima-evm-utils/jobs/501101861
SELinux Test Suite result (diff 5.11.14-200.fc33.x86_64 5.12.0-rc8+):
-Files=70, Tests=1099, 82 wallclock secs ( 0.35 usr 0.09 sys + 7.39 cusr 10.14 csys = 17.97 CPU)
+Files=70, Tests=1108, 85 wallclock secs ( 0.34 usr 0.10 sys + 7.25 cusr 11.39 csys = 19.08 CPU)
Result: FAIL
-Failed 2/70 test programs. 5/1099 subtests failed.
+Failed 2/70 test programs. 5/1108 subtests failed.
Smack Test Suite result:
smack_set_ambient 1 TPASS: Test "smack_set_ambient" success.
smack_set_current 1 TPASS: Test "smack_set_current" success.
smack_set_doi 1 TPASS: Test "smack_set_doi" success.
smack_set_netlabel 1 TPASS: Test "smack_set_netlabel" success.
smack_set_socket_labels 1 TPASS : Test smack_set_socket_labels success.
smack_set_cipso 1 TPASS: Test "smack_set_cipso" success.
smack_set_direct 1 TPASS: Test "smack_set_direct" success.
smack_set_load 1 TPASS: Test "smack_set_load" success.
smack_set_onlycap 1 TFAIL: The smack label reported for "/smack/onlycap"
Lastly, running the test on reiserfs to check
security_old_inode_init_security(), some issues have been discovered: a
free of xattr->name which is not correct after commit 9548906b2bb7 ('xattr:
Constify ->name member of "struct xattr"'), missing calls to
reiserfs_security_free() and a misalignment with
security_inode_init_security() (the old version expects the full xattr name
with the security. prefix, the new version just the suffix). The last issue
has not been fixed yet.
Changelog
v2:
- rewrite selinux_old_inode_init_security() to use
security_inode_init_security()
- add lbs_xattr field to lsm_blob_sizes structure, to give the ability to
LSMs to reserve slots in the xattr array (suggested by Casey)
- add new parameter base_slot to inode_init_security hook definition
v1:
- add calls to reiserfs_security_free() and initialize sec->value to NULL
(suggested by Tetsuo and Mimi)
- change definition of inode_init_security hook, replace the name, value
and len triple with the xattr array (suggested by Casey)
- introduce lsm_find_xattr_slot() helper for LSMs to find an unused slot in
the passed xattr array
Roberto Sassu (6):
reiserfs: Add missing calls to reiserfs_security_free()
security: Rewrite security_old_inode_init_security()
security: Pass xattrs allocated by LSMs to the inode_init_security
hook
security: Support multiple LSMs implementing the inode_init_security
hook
evm: Align evm_inode_init_security() definition with LSM
infrastructure
evm: Support multiple LSMs providing an xattr
fs/reiserfs/namei.c | 4 +
fs/reiserfs/xattr_security.c | 1 +
include/linux/evm.h | 19 +++--
include/linux/lsm_hook_defs.h | 4 +-
include/linux/lsm_hooks.h | 22 +++++-
security/integrity/evm/evm.h | 2 +
security/integrity/evm/evm_crypto.c | 9 ++-
security/integrity/evm/evm_main.c | 30 +++++--
security/security.c | 116 +++++++++++++++++++++++-----
security/selinux/hooks.c | 18 +++--
security/smack/smack_lsm.c | 27 ++++---
11 files changed, 194 insertions(+), 58 deletions(-)
--
2.25.1
This patch changes the evm_inode_init_security() definition to align with
the LSM infrastructure, in preparation for moving IMA and EVM to that
infrastructure.
Signed-off-by: Roberto Sassu <[email protected]>
---
include/linux/evm.h | 19 ++++++++++++-------
security/integrity/evm/evm_main.c | 19 +++++++++++++------
security/security.c | 6 +++---
3 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/include/linux/evm.h b/include/linux/evm.h
index 8cad46bcec9d..8b1c36c19e97 100644
--- a/include/linux/evm.h
+++ b/include/linux/evm.h
@@ -34,9 +34,10 @@ extern int evm_inode_removexattr(struct user_namespace *mnt_userns,
struct dentry *dentry, const char *xattr_name);
extern void evm_inode_post_removexattr(struct dentry *dentry,
const char *xattr_name);
-extern int evm_inode_init_security(struct inode *inode,
- const struct xattr *xattr_array,
- struct xattr *evm);
+extern int evm_inode_init_security(struct inode *inode, struct inode *dir,
+ const struct qstr *qstr,
+ struct xattr *xattrs, int *base_slot,
+ void *fs_data);
extern bool evm_status_revalidate(const char *xattr_name);
#ifdef CONFIG_FS_POSIX_ACL
extern int posix_xattr_acl(const char *xattrname);
@@ -102,11 +103,15 @@ static inline void evm_inode_post_removexattr(struct dentry *dentry,
return;
}
-static inline int evm_inode_init_security(struct inode *inode,
- const struct xattr *xattr_array,
- struct xattr *evm)
+static inline int evm_inode_init_security(struct inode *inode, struct inode *dir,
+ const struct qstr *qstr,
+ struct xattr *xattrs, int *base_slot,
+ void *fs_data)
{
- return 0;
+ if (!xattrs || !xattrs->name)
+ return 0;
+
+ return -EOPNOTSUPP;
}
static inline bool evm_status_revalidate(const char *xattr_name)
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index 84a9b7a69b1f..d647bfd0adcd 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -17,6 +17,7 @@
#include <linux/xattr.h>
#include <linux/integrity.h>
#include <linux/evm.h>
+#include <linux/lsm_hooks.h>
#include <linux/magic.h>
#include <linux/posix_acl_xattr.h>
@@ -706,23 +707,29 @@ void evm_inode_post_setattr(struct dentry *dentry, int ia_valid)
/*
* evm_inode_init_security - initializes security.evm HMAC value
*/
-int evm_inode_init_security(struct inode *inode,
- const struct xattr *lsm_xattr,
- struct xattr *evm_xattr)
+int evm_inode_init_security(struct inode *inode, struct inode *dir,
+ const struct qstr *qstr,
+ struct xattr *xattrs, int *base_slot,
+ void *fs_data)
{
struct evm_xattr *xattr_data;
+ struct xattr *evm_xattr = lsm_find_xattr_slot(xattrs, base_slot,
+ *base_slot + 1);
int rc;
- if (!(evm_initialized & EVM_INIT_HMAC) ||
- !evm_protected_xattr(lsm_xattr->name))
+ if (!xattrs || !xattrs->name)
return 0;
+ if (!(evm_initialized & EVM_INIT_HMAC) ||
+ !evm_protected_xattr(xattrs->name))
+ return -EOPNOTSUPP;
+
xattr_data = kzalloc(sizeof(*xattr_data), GFP_NOFS);
if (!xattr_data)
return -ENOMEM;
xattr_data->data.type = EVM_XATTR_HMAC;
- rc = evm_init_hmac(inode, lsm_xattr, xattr_data->digest);
+ rc = evm_init_hmac(inode, xattrs, xattr_data->digest);
if (rc < 0)
goto out;
diff --git a/security/security.c b/security/security.c
index 91675003a5cf..f090362550fa 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1103,9 +1103,9 @@ int security_inode_init_security(struct inode *inode, struct inode *dir,
goto out;
}
- ret = evm_inode_init_security(inode, new_xattrs,
- new_xattrs + base_slot);
- if (ret)
+ ret = evm_inode_init_security(inode, dir, qstr, new_xattrs, &base_slot,
+ fs_data);
+ if (ret && ret != -EOPNOTSUPP)
goto out;
ret = initxattrs(inode, new_xattrs, fs_data);
out:
--
2.25.1
Commit 57fe60df6241 ("reiserfs: add atomic addition of selinux attributes
during inode creation") defined reiserfs_security_free() to free the name
and value of a security xattr allocated by the active LSM through
security_old_inode_init_security(). However, this function is not called
in the reiserfs code.
Thus, this patch adds a call to reiserfs_security_free() whenever
reiserfs_security_init() is called, and initializes value to NULL, to avoid
to call kfree() on an uninitialized pointer.
Fixes: 57fe60df6241 ("reiserfs: add atomic addition of selinux attributes during inode creation")
Cc: [email protected]
Cc: Jeff Mahoney <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Reported-by: Mimi Zohar <[email protected]>
Reported-by: Tetsuo Handa <[email protected]>
Signed-off-by: Roberto Sassu <[email protected]>
---
fs/reiserfs/namei.c | 4 ++++
fs/reiserfs/xattr_security.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index e6eb05e2b2f1..6b5c51a77fae 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -695,6 +695,7 @@ static int reiserfs_create(struct user_namespace *mnt_userns, struct inode *dir,
out_failed:
reiserfs_write_unlock(dir->i_sb);
+ reiserfs_security_free(&security);
return retval;
}
@@ -778,6 +779,7 @@ static int reiserfs_mknod(struct user_namespace *mnt_userns, struct inode *dir,
out_failed:
reiserfs_write_unlock(dir->i_sb);
+ reiserfs_security_free(&security);
return retval;
}
@@ -877,6 +879,7 @@ static int reiserfs_mkdir(struct user_namespace *mnt_userns, struct inode *dir,
retval = journal_end(&th);
out_failed:
reiserfs_write_unlock(dir->i_sb);
+ reiserfs_security_free(&security);
return retval;
}
@@ -1193,6 +1196,7 @@ static int reiserfs_symlink(struct user_namespace *mnt_userns,
retval = journal_end(&th);
out_failed:
reiserfs_write_unlock(parent_dir->i_sb);
+ reiserfs_security_free(&security);
return retval;
}
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c
index bb2a0062e0e5..b1ad93b60475 100644
--- a/fs/reiserfs/xattr_security.c
+++ b/fs/reiserfs/xattr_security.c
@@ -50,6 +50,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode,
int error;
sec->name = NULL;
+ sec->value = NULL;
/* Don't add selinux attributes on xattrs - they'll never get used */
if (IS_PRIVATE(dir))
--
2.25.1
Currently, evm_inode_init_security() processes a single LSM xattr from
the array passed by security_inode_init_security(), and calculates the
HMAC on it and other inode metadata.
Given that initxattrs(), called by security_inode_init_security(), expects
that this array is terminated when the xattr name is set to NULL, this
patch reuses the same assumption for to scan all xattrs and to calculate
the HMAC on all of them.
Signed-off-by: Roberto Sassu <[email protected]>
---
security/integrity/evm/evm.h | 2 ++
security/integrity/evm/evm_crypto.c | 9 ++++++++-
security/integrity/evm/evm_main.c | 15 +++++++++++----
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/security/integrity/evm/evm.h b/security/integrity/evm/evm.h
index ae590f71ce7d..24eac42b9f32 100644
--- a/security/integrity/evm/evm.h
+++ b/security/integrity/evm/evm.h
@@ -49,6 +49,8 @@ struct evm_digest {
char digest[IMA_MAX_DIGEST_SIZE];
} __packed;
+int evm_protected_xattr(const char *req_xattr_name);
+
int evm_init_key(void);
int __init evm_init_crypto(void);
int evm_update_evmxattr(struct dentry *dentry,
diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c
index b66264b53d5d..35c5eec0517d 100644
--- a/security/integrity/evm/evm_crypto.c
+++ b/security/integrity/evm/evm_crypto.c
@@ -358,6 +358,7 @@ int evm_init_hmac(struct inode *inode, const struct xattr *lsm_xattr,
char *hmac_val)
{
struct shash_desc *desc;
+ const struct xattr *xattr;
desc = init_desc(EVM_XATTR_HMAC, evm_hash_algo);
if (IS_ERR(desc)) {
@@ -365,7 +366,13 @@ int evm_init_hmac(struct inode *inode, const struct xattr *lsm_xattr,
return PTR_ERR(desc);
}
- crypto_shash_update(desc, lsm_xattr->value, lsm_xattr->value_len);
+ for (xattr = lsm_xattr; xattr->name != NULL; xattr++) {
+ if (!evm_protected_xattr(xattr->name))
+ continue;
+
+ crypto_shash_update(desc, xattr->value, xattr->value_len);
+ }
+
hmac_add_misc(desc, inode, EVM_XATTR_HMAC, hmac_val);
kfree(desc);
return 0;
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index d647bfd0adcd..cd2f46770646 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -261,7 +261,7 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry,
return evm_status;
}
-static int evm_protected_xattr(const char *req_xattr_name)
+int evm_protected_xattr(const char *req_xattr_name)
{
int namelen;
int found = 0;
@@ -713,15 +713,22 @@ int evm_inode_init_security(struct inode *inode, struct inode *dir,
void *fs_data)
{
struct evm_xattr *xattr_data;
+ struct xattr *xattr;
struct xattr *evm_xattr = lsm_find_xattr_slot(xattrs, base_slot,
*base_slot + 1);
- int rc;
+ int rc, evm_protected_xattrs = 0;
if (!xattrs || !xattrs->name)
return 0;
- if (!(evm_initialized & EVM_INIT_HMAC) ||
- !evm_protected_xattr(xattrs->name))
+ if (!(evm_initialized & EVM_INIT_HMAC))
+ return -EOPNOTSUPP;
+
+ for (xattr = xattrs; xattr->name != NULL && xattr < evm_xattr; xattr++)
+ if (evm_protected_xattr(xattr->name))
+ evm_protected_xattrs++;
+
+ if (!evm_protected_xattrs)
return -EOPNOTSUPP;
xattr_data = kzalloc(sizeof(*xattr_data), GFP_NOFS);
--
2.25.1
> From: Roberto Sassu
> Sent: Tuesday, April 27, 2021 1:37 PM
> This patch set depends on:
>
> https://lore.kernel.org/linux-integrity/20210409114313.4073-1-
> [email protected]/
> https://lore.kernel.org/linux-integrity/20210407105252.30721-1-
> [email protected]/
>
> One of the challenges that must be tackled to move IMA and EVM to the
> LSM
> infrastructure is to ensure that EVM is capable to correctly handle
> multiple stacked LSMs providing an xattr at file creation. At the moment,
> there are few issues that would prevent a correct integration. This patch
> set aims at solving them.
Hi
anything I should do more for this patch set?
The first two patches are bug fixes and should be ready for merge.
For the rest, this patch set would be still useful even if IMA/EVM are
not moved to the LSM infrastructure. Its main purpose is to make it
possible to use multiple LSMs providing an implementation for the
inode_init_security hook.
Although this wouldn't be needed by LSMs already in the kernel,
as there can be only one major LSM, it would be useful for people
developing new LSMs.
Thanks
Roberto
HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063
Managing Director: Li Peng, Li Jian, Shi Yanli
> From the LSM infrastructure side, the LSM stacking feature added the
> possibility of registering multiple implementations of the security hooks,
> that are called sequentially whenever someone calls the corresponding
> security hook. However, security_inode_init_security() and
> security_old_inode_init_security() are currently limited to support one
> xattr provided by LSM and one by EVM.
>
> In addition, using the call_int_hook() macro causes some issues. According
> to the documentation in include/linux/lsm_hooks.h, it is a legitimate case
> that an LSM returns -EOPNOTSUPP when it does not want to provide an
> xattr.
> However, the loop defined in the macro would stop calling subsequent LSMs
> if that happens. In the case of security_old_inode_init_security(), using
> the macro would also cause a memory leak due to replacing the *value
> pointer, if multiple LSMs provide an xattr.
>
> From EVM side, the first operation to be done is to change the definition
> of evm_inode_init_security() to be compatible with the security hook
> definition. Unfortunately, the current definition does not provide enough
> information for EVM, as it must have visibility of all xattrs provided by
> LSMs to correctly calculate the HMAC. This patch set changes the security
> hook definition by replacing the name, value and len triple with the xattr
> array allocated by security_inode_init_security().
>
> Secondly, EVM must know how many elements are in the xattr array. EVM
> can
> rely on the fact that the xattr array must be terminated with an element
> with name field set to NULL, but can also benefit from the enhancements
> that have been included in this version of the patch set.
>
> Casey suggested to use the reservation mechanism currently implemented
> for
> other security blobs, for xattrs. In this way,
> security_inode_init_security() can know after LSM initialization how many
> slots for xattrs should be allocated, and LSMs know the offset in the
> array from where they can start writing xattrs.
>
> One of the problem was that LSMs can decide at run-time, although they
> reserved a slot, to not use it (for example because they were not
> initialized). Given that the initxattrs() method implemented by filesystems
> expect that the array is continuous, they would miss the slots after the
> one not being initialized. security_inode_init_security() should have been
> modified to compact the array.
>
> Instead, the preferred solution was to introduce the base slot as a
> parameter, in addition to the xattr array, containing the up to date
> information about the slots used by previous LSMs. The correctness of the
> update of the slot is ensured by both the LSMs, if they use the new helper
> lsm_find_xattr_slot(), and by security_inode_init_security() which checks
> the slot each time after an LSM executes the inode_init_security hook.
>
> This patch set has been tested by introducing several instances of a
> TestLSM (some providing an xattr, some not, one with a wrong
> implementation
> to see how the LSM infrastructure handles it). The patch is not included
> in this set but it is available here:
>
> https://github.com/robertosassu/linux/commit/c7e01af6cb2c6780f0b143070
> 269fff7e30053f9
>
> The test, added to ima-evm-utils, is available here:
>
> https://github.com/robertosassu/ima-evm-utils/blob/evm-multiple-lsms-v3-
> devel-v7/tests/evm_multiple_lsms.test
>
> The test takes a UML kernel built by Travis and launches it several times,
> each time with a different combination of LSMs. After boot, it first checks
> that there is an xattr for each LSM providing it, and then calculates the
> HMAC in user space and compares it with the HMAC calculated by EVM in
> kernel space.
>
> A test report can be obtained here:
>
> https://travis-ci.com/github/robertosassu/ima-evm-utils/jobs/501101861
>
> SELinux Test Suite result (diff 5.11.14-200.fc33.x86_64 5.12.0-rc8+):
> -Files=70, Tests=1099, 82 wallclock secs ( 0.35 usr 0.09 sys + 7.39 cusr 10.14
> csys = 17.97 CPU)
> +Files=70, Tests=1108, 85 wallclock secs ( 0.34 usr 0.10 sys + 7.25 cusr 11.39
> csys = 19.08 CPU)
> Result: FAIL
> -Failed 2/70 test programs. 5/1099 subtests failed.
> +Failed 2/70 test programs. 5/1108 subtests failed.
>
> Smack Test Suite result:
> smack_set_ambient 1 TPASS: Test "smack_set_ambient" success.
> smack_set_current 1 TPASS: Test "smack_set_current" success.
> smack_set_doi 1 TPASS: Test "smack_set_doi" success.
> smack_set_netlabel 1 TPASS: Test "smack_set_netlabel" success.
> smack_set_socket_labels 1 TPASS : Test smack_set_socket_labels
> success.
> smack_set_cipso 1 TPASS: Test "smack_set_cipso" success.
> smack_set_direct 1 TPASS: Test "smack_set_direct" success.
> smack_set_load 1 TPASS: Test "smack_set_load" success.
> smack_set_onlycap 1 TFAIL: The smack label reported for "/smack/onlycap"
>
> Lastly, running the test on reiserfs to check
> security_old_inode_init_security(), some issues have been discovered: a
> free of xattr->name which is not correct after commit 9548906b2bb7 ('xattr:
> Constify ->name member of "struct xattr"'), missing calls to
> reiserfs_security_free() and a misalignment with
> security_inode_init_security() (the old version expects the full xattr name
> with the security. prefix, the new version just the suffix). The last issue
> has not been fixed yet.
>
> Changelog
>
> v2:
> - rewrite selinux_old_inode_init_security() to use
> security_inode_init_security()
> - add lbs_xattr field to lsm_blob_sizes structure, to give the ability to
> LSMs to reserve slots in the xattr array (suggested by Casey)
> - add new parameter base_slot to inode_init_security hook definition
>
> v1:
> - add calls to reiserfs_security_free() and initialize sec->value to NULL
> (suggested by Tetsuo and Mimi)
> - change definition of inode_init_security hook, replace the name, value
> and len triple with the xattr array (suggested by Casey)
> - introduce lsm_find_xattr_slot() helper for LSMs to find an unused slot in
> the passed xattr array
>
> Roberto Sassu (6):
> reiserfs: Add missing calls to reiserfs_security_free()
> security: Rewrite security_old_inode_init_security()
> security: Pass xattrs allocated by LSMs to the inode_init_security
> hook
> security: Support multiple LSMs implementing the inode_init_security
> hook
> evm: Align evm_inode_init_security() definition with LSM
> infrastructure
> evm: Support multiple LSMs providing an xattr
>
> fs/reiserfs/namei.c | 4 +
> fs/reiserfs/xattr_security.c | 1 +
> include/linux/evm.h | 19 +++--
> include/linux/lsm_hook_defs.h | 4 +-
> include/linux/lsm_hooks.h | 22 +++++-
> security/integrity/evm/evm.h | 2 +
> security/integrity/evm/evm_crypto.c | 9 ++-
> security/integrity/evm/evm_main.c | 30 +++++--
> security/security.c | 116 +++++++++++++++++++++++-----
> security/selinux/hooks.c | 18 +++--
> security/smack/smack_lsm.c | 27 ++++---
> 11 files changed, 194 insertions(+), 58 deletions(-)
>
> --
> 2.25.1