linux-brain/security/integrity
Sascha Hauer 27551dbe09 ima: always return negative code for error
[ Upstream commit f5e1040196 ]

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-11 18:18:37 +02:00
..
evm EVM: Add support for portable signature format 2018-12-01 09:43:00 +01:00
ima ima: always return negative code for error 2019-10-11 18:18:37 +02:00
digsig_asymmetric.c integrity: Small code improvements 2017-06-21 14:37:12 -04:00
digsig.c integrity/security: fix digsig.c build error with header file 2018-05-30 07:52:02 +02:00
iint.c ima: re-initialize iint->atomic_flags 2018-12-01 09:43:00 +01:00
integrity_audit.c Merge git://git.infradead.org/users/eparis/audit 2014-04-12 12:38:53 -07:00
integrity.h ima: re-introduce own integrity cache lock 2018-12-01 09:43:00 +01:00
Kconfig security: integrity: Remove select to deleted option PUBLIC_KEY_ALGO_RSA 2016-04-12 19:54:58 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00