IMA: add support to measure buffer data hash
authorTushar Sugandhi <tusharsu@linux.microsoft.com>
Fri, 8 Jan 2021 04:07:02 +0000 (20:07 -0800)
committerMimi Zohar <zohar@linux.ibm.com>
Fri, 15 Jan 2021 04:41:23 +0000 (23:41 -0500)
commit291af651b350817f7f1cbe308faaf7fa7af2a92c
tree4172c749579e27e6dc99b1da9da336ef898cfb42
parent2b4a2474a2027eb683bc421eff286fc617ce1d82
IMA: add support to measure buffer data hash

The original IMA buffer data measurement sizes were small (e.g.  boot
command line), but the new buffer data measurement use cases have data
sizes that are a lot larger.  Just as IMA measures the file data hash,
not the file data, IMA should similarly support the option for measuring
buffer data hash.

Introduce a boolean parameter to support measuring buffer data hash,
which would be much smaller, instead of the buffer itself.

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_appraise.c
security/integrity/ima/ima_asymmetric_keys.c
security/integrity/ima/ima_main.c
security/integrity/ima/ima_queue_keys.c