IMA: policy can now be updated multiple times
authorPetko Manolov <petkan@mip-labs.com>
Wed, 2 Dec 2015 15:47:54 +0000 (17:47 +0200)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Tue, 15 Dec 2015 15:01:43 +0000 (10:01 -0500)
commit38d859f991f3a05b352a06f82af0baa1acf33e02
tree05100d5f61490abf1a180d2f51b8b0960bba5123
parent05d3884b1ee66d83ad70ffa658c7b363797e2b0c
IMA: policy can now be updated multiple times

The new rules get appended to the original policy, forming a queue.
The new rules are first added to a temporary list, which on error
get released without disturbing the normal IMA operations.  On
success both lists (the current policy and the new rules) are spliced.

IMA policy reads are many orders of magnitude more numerous compared to
writes, the match code is RCU protected.  The updater side also does
list splice in RCU manner.

Signed-off-by: Petko Manolov <petkan@mip-labs.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/Kconfig
security/integrity/ima/ima_fs.c
security/integrity/ima/ima_policy.c