android_kernel_oneplus_msm8998/security/integrity/ima
Boshi Wang 80f93e24ec ima: fix hash algorithm initialization
[ Upstream commit ebe7c0a7be92bbd34c6ff5b55810546a0ee05bee ]

The hash_setup function always sets the hash_setup_done flag, even
when the hash algorithm is invalid.  This prevents the default hash
algorithm defined as CONFIG_IMA_DEFAULT_HASH from being used.

This patch sets hash_setup_done flag only for valid hash algorithms.

Fixes: e7a2ad7eb6 "ima: enable support for larger default filedata hash algorithms"
Signed-off-by: Boshi Wang <wangboshi@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-09 18:42:38 +01:00
..
ima.h ima: fix ima_show_template_data_ascii() 2015-06-16 08:18:21 -04:00
ima_api.c ima: use file_dentry() 2016-10-16 17:36:15 +02:00
ima_appraise.c ima: do not update security.ima if appraisal status is not INTEGRITY_PASS 2017-11-24 08:32:24 +01:00
ima_crypto.c mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM 2015-11-06 17:50:42 -08:00
ima_fs.c ima: fix ima_show_template_data_ascii() 2015-06-16 08:18:21 -04:00
ima_init.c ima: pass iint to ima_add_violation() 2015-05-21 13:59:29 -04:00
ima_main.c ima: fix hash algorithm initialization 2017-12-09 18:42:38 +01:00
ima_policy.c ima: update builtin policies 2015-06-16 08:18:45 -04:00
ima_queue.c integrity: fix checkpatch errors 2014-03-07 12:15:45 -05:00
ima_template.c ima: added support for new kernel cmdline parameter ima_template_fmt 2014-10-13 08:39:02 -04:00
ima_template_lib.c ima: fix ima_show_template_data_ascii() 2015-06-16 08:18:21 -04:00
ima_template_lib.h ima: wrap event related data to the new ima_event_data structure 2015-05-21 13:59:28 -04:00
Kconfig ima: /proc/keys is now mandatory 2015-02-02 13:19:48 +11:00
Makefile ima: define template fields library and new helpers 2013-10-25 17:17:05 -04:00