linux/security/integrity/ima
Dmitry Kasatkin 3bcced39ea ima: use ahash API for file hash calculation
Async hash API allows the use of HW acceleration for hash calculation.
It may give significant performance gain and/or reduce power consumption,
which might be very beneficial for battery powered devices.

This patch introduces hash calculation using ahash API. ahash performance
depends on the data size and the particular HW. Depending on the specific
system, shash performance may be better.

This patch defines 'ahash_minsize' module parameter, which is used to
define the minimal file size to use with ahash.  If this minimum file size
is not set or the file is smaller than defined by the parameter, shash will
be used.

Changes in v3:
- kernel parameter replaced with module parameter
- pr_crit replaced with pr_crit_ratelimited
- more comment changes - Mimi

Changes in v2:
- ima_ahash_size became as ima_ahash
- ahash pre-allocation moved out from __init code to be able to use
  ahash crypto modules. Ahash allocated once on the first use.
- hash calculation falls back to shash if ahash allocation/calculation fails
- complex initialization separated from variable declaration
- improved comments

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2014-07-17 09:35:10 -04:00
..
ima_api.c ima: audit log files opened with O_DIRECT flag 2014-06-03 14:21:50 -05:00
ima_appraise.c audit: fix dangling keywords in integrity ima message output 2014-07-17 09:35:10 -04:00
ima_crypto.c ima: use ahash API for file hash calculation 2014-07-17 09:35:10 -04:00
ima_fs.c integrity: fix checkpatch errors 2014-03-07 12:15:45 -05:00
ima_init.c security: integrity: Use a more current logging style 2014-03-07 12:15:21 -05:00
ima_main.c ima: delay template descriptor lookup until use 2014-07-17 09:35:09 -04:00
ima_policy.c audit: fix dangling keywords in integrity ima message output 2014-07-17 09:35:10 -04:00
ima_queue.c integrity: fix checkpatch errors 2014-03-07 12:15:45 -05:00
ima_template_lib.c ima: reduce memory usage when a template containing the n field is used 2014-03-07 11:32:30 -05:00
ima_template_lib.h ima: extend the measurement list to include the file signature 2013-10-31 20:19:35 -04:00
ima_template.c integrity: fix checkpatch errors 2014-03-07 12:15:45 -05:00
ima.h ima: restore the original behavior for sending data with ima template 2014-03-07 11:32:29 -05:00
Kconfig Revert "ima: define '_ima' as a builtin 'trusted' keyring" 2013-11-23 16:36:35 -08:00
Makefile ima: define template fields library and new helpers 2013-10-25 17:17:05 -04:00