lineage_android_kernel_xiao.../security
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
..
apparmor
integrity ima: always return negative code for error 2019-10-17 13:42:09 -07:00
keys
loadpin
selinux
smack smack: use GFP_NOFS while holding inode_smack::smk_lock 2019-10-07 18:53:25 +02:00
tomoyo
yama
Kconfig
Makefile
commoncap.c
device_cgroup.c
inode.c
lsm_audit.c
min_addr.c
security.c