android_kernel_samsung_a7y1.../security/integrity/ima
Sascha Hauer 581c737dc0 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>
2020-04-07 08:07:54 +02:00
..
ima_api.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_appraise.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_crypto.c ima: always return negative code for error 2020-04-07 08:07:54 +02:00
ima_fs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_init.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_main.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_policy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_queue.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_template_lib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_template_lib.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima_template.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30