Re: [PATCH v4 12/17] LSM: Add "contents" flag to kernel_read_file hook

From
Mimi Zohar <zohar@linux.ibm.com>
Date
2020-08-07 00:24:16
Also in
linux-integrity, linux-kselftest, linux-security-module, lkml, selinux
Reply to
Kees Cook, 2020-07-29
On Wed, 2020-07-29 at 10:58 -0700, Kees Cook wrote:
As with the kernel_load_data LSM hook, add a "contents" flag to the
kernel_read_file LSM hook that indicates whether the LSM can expect
a matching call to the kernel_post_read_file LSM hook with the full
contents of the file. With the coming addition of partial file read
support for kernel_read_file*() API, the LSM will no longer be able
to always see the entire contents of a file during the read calls.

For cases where the LSM must read examine the complete file contents,
it will need to do so on its own every time the kernel_read_file
hook is called with contents=false (or reject such cases). Adjust all
existing LSMs to retain existing behavior.

Signed-off-by: Kees Cook <redacted>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Thread (28 messages) 28 messages, 5 authors, last reply 2020-08-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help