android_kernel_samsung_a7y1.../security/integrity
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
..
evm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ima ima: always return negative code for error 2020-04-07 08:07:54 +02:00
digsig_asymmetric.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
digsig.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
iint.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
integrity_audit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
integrity.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