android_kernel_sony_sdm845/security/integrity/ima
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sascha Hauer 1e42dec195 ima: always return negative code for error
[ Upstream commit f5e1040196dbfe14c77ce3dfe3b7b08d2d961e88 ]

integrity_kernel_read() returns the number of bytes read. If this is
a short read then this positive value is returned from
ima_calc_file_hash_atfm(). Currently this is only indirectly called from
ima_calc_file_hash() and this function only tests for the return value
being zero or nonzero and also doesn't forward the return value.
Nevertheless there's no point in returning a positive value as an error,
so translate a short read into -EINVAL.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-17 13:42:09 -07:00
..
ima.h ima: fix ima_d_path() possible race with rename 2017-03-12 06:41:44 +01:00
ima_api.c ima: always measure and audit files in policy 2018-12-01 09:44:26 +01:00
ima_appraise.c ima: re-introduce own integrity cache lock 2018-12-01 09:44:26 +01:00
ima_crypto.c ima: always return negative code for error 2019-10-17 13:42:09 -07:00
ima_fs.c ima: fix showing large 'violations' or 'runtime_measurements_count' 2018-11-13 11:16:57 -08:00
ima_init.c ima: include pcr for each measurement log entry 2016-06-30 01:14:21 -04:00
ima_main.c ima: re-introduce own integrity cache lock 2018-12-01 09:44:26 +01:00
ima_mok.c IMA: Use the the system trusted keyrings instead of .ima_mok 2016-04-11 22:49:15 +01:00
ima_policy.c ima: extend ima_get_action() to return the policy pcr 2016-06-30 01:14:20 -04:00
ima_queue.c ima: extend the measurement entry specific pcr 2016-06-30 01:14:22 -04:00
ima_template.c ima: separate 'security.ima' reading functionality from collect 2016-02-18 17:13:32 -05:00
ima_template_lib.c ima: separate 'security.ima' reading functionality from collect 2016-02-18 17:13:32 -05: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: Use the the system trusted keyrings instead of .ima_mok 2016-04-11 22:49:15 +01:00
Makefile IMA: Use the the system trusted keyrings instead of .ima_mok 2016-04-11 22:49:15 +01:00