mbox series

[v4,0/2] ima: Handle -ESTALE returned by ima_filter_rule_match()

Message ID 20220909011516.55957-1-guozihua@huawei.com (mailing list archive)
Headers show
Series ima: Handle -ESTALE returned by ima_filter_rule_match() | expand

Message

Guozihua (Scott) Sept. 9, 2022, 1:15 a.m. UTC
IMA happens to measure extra files if LSM based rules are specified and
the corresponding LSM is updating its policy.

The root cause is explained in the second patch.

GUO Zihua (2):
  ima: Simplify ima_lsm_copy_rule
  ima: Handle -ESTALE returned by ima_filter_rule_match()

 security/integrity/ima/ima_policy.c | 38 +++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 10 deletions(-)

---

v4:
  Use a tempory rule instead of updating the rule in place. To do that,
also update ima_lsm_copy_rule so we can make use of it.

v3:
  Update current rule instead of just retrying, as suggested by Mimi

v2:
  Fixes message errors pointed out by Mimi