linux/security
Kees Cook 0fa8e08464 fs/kernel_file_read: Add "offset" arg for partial reads
To perform partial reads, callers of kernel_read_file*() must have a
non-NULL file_size argument and a preallocated buffer. The new "offset"
argument can then be used to seek to specific locations in the file to
fill the buffer to, at most, "buf_size" per call.

Where possible, the LSM hooks can report whether a full file has been
read or not so that the contents can be reasoned about.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201002173828.2099543-14-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05 13:37:04 +02:00
..
apparmor treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
bpf
integrity fs/kernel_file_read: Add "offset" arg for partial reads 2020-10-05 13:37:04 +02:00
keys treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
loadpin LSM: Add "contents" flag to kernel_read_file hook 2020-10-05 13:37:03 +02:00
lockdown
safesetid
selinux LSM: Add "contents" flag to kernel_read_file hook 2020-10-05 13:37:03 +02:00
smack treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tomoyo treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
yama
commoncap.c
device_cgroup.c
inode.c
Kconfig
Kconfig.hardening
lsm_audit.c
Makefile
min_addr.c
security.c LSM: Add "contents" flag to kernel_read_file hook 2020-10-05 13:37:03 +02:00