linux_dsm_epyc7002/security/integrity/ima
Roberto Sassu a71dc65d30 ima: switch to new template management mechanism
This patch performs the switch to the new template mechanism by modifying
the functions ima_alloc_init_template(), ima_measurements_show() and
ima_ascii_measurements_show(). The old function ima_template_show() was
removed as it is no longer needed. Also, if the template descriptor used
to generate a measurement entry is not 'ima', the whole length of field
data stored for an entry is provided before the data itself through the
binary_runtime_measurement interface.

Changelog:
- unnecessary to use strncmp() (Mimi Zohar)
- create new variable 'field' in ima_alloc_init_template() (Roberto Sassu)
- use GFP_NOFS flag in ima_alloc_init_template() (Roberto Sassu)
- new variable 'num_fields' in ima_store_template() (Roberto Sassu,
  proposed by Mimi Zohar)
- rename ima_calc_buffer_hash/template_hash() to ima_calc_field_array_hash(),
  something more generic (Mimi, requested by Dmitry)
- sparse error fix - Fengguang Wu
- fix lindent warnings
- always include the field length in the template data length
- include the template field length variable size in the template data length
- include both the template field data and field length in the template digest
  calculation. Simplifies verifying the template digest. (Mimi)

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2013-10-25 17:17:06 -04:00
..
ima_api.c ima: switch to new template management mechanism 2013-10-25 17:17:06 -04:00
ima_appraise.c ima: use dynamically allocated hash storage 2013-10-25 17:17:00 -04:00
ima_crypto.c ima: switch to new template management mechanism 2013-10-25 17:17:06 -04:00
ima_fs.c ima: switch to new template management mechanism 2013-10-25 17:17:06 -04:00
ima_init.c ima: new templates management mechanism 2013-10-25 17:17:04 -04:00
ima_main.c ima: pass the file descriptor to ima_add_violation() 2013-10-25 17:17:02 -04:00
ima_policy.c Revert "ima: policy for RAMFS" 2013-10-25 13:17:19 -04:00
ima_queue.c ima: pass the filename argument up to ima_add_template_entry() 2013-10-25 17:17:03 -04:00
ima_template_lib.c ima: define new template ima-ng and template fields d-ng and n-ng 2013-10-25 17:17:05 -04:00
ima_template_lib.h ima: define new template ima-ng and template fields d-ng and n-ng 2013-10-25 17:17:05 -04:00
ima_template.c ima: switch to new template management mechanism 2013-10-25 17:17:06 -04:00
ima.h ima: switch to new template management mechanism 2013-10-25 17:17:06 -04:00
Kconfig ima: provide support for arbitrary hash algorithms 2013-10-25 17:16:58 -04:00
Makefile ima: define template fields library and new helpers 2013-10-25 17:17:05 -04:00