-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Goals:
Provide a new interface for managing (create/read/delete) snapshots of the measurement list.
Why:
Allow system administrators to relieve the system from kernel memory pressure by moving the IMA measurement list to a different storage (use case-defined). For example, an user space service can periodically create snapshots of the measurement lists, and append them together to build a global measurement list that can be sent to remote verifiers for attestation.
How:
Create a secondary measurement list. Implement the create method as a list replace from the current IMA measurement list to the secondary. Implement the read method similar to the original measurement list method (but on the secondary list). Implement the delete method by removing all the elements in the secondary measurement list.
At the same time, add a kernel option to let system administrators decide if they want or not to flush the kernel hash table too (used for detecting measurement collisions).
Locking: the regular measurement list lock is taken only when a snapshot is created (to protect the list replace and the hash table flush); atomic bit operations protect access to the regular measurement list and the new snapshot interfaces (only one can be accessed at time by one process).