IMA: generalize keyring specific measurement constructs
authorTushar Sugandhi <tusharsu@linux.microsoft.com>
Fri, 8 Jan 2021 04:07:01 +0000 (20:07 -0800)
committerMimi Zohar <zohar@linux.ibm.com>
Fri, 15 Jan 2021 04:41:13 +0000 (23:41 -0500)
commit2b4a2474a2027eb683bc421eff286fc617ce1d82
treec4a7645945847ab403ad23d57f8bca5bca5d8169
parentccf11dbaa07b328fa469415c362d33459c140a37
IMA: generalize keyring specific measurement constructs

IMA functions such as ima_match_keyring(), process_buffer_measurement(),
ima_match_policy() etc.  handle data specific to keyrings.  Currently,
these constructs are not generic to handle any func specific data.
This makes it harder to extend them without code duplication.

Refactor the keyring specific measurement constructs to be generic and
reusable in other measurement scenarios.

Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Reviewed-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima.h
security/integrity/ima/ima_api.c
security/integrity/ima/ima_main.c
security/integrity/ima/ima_policy.c