aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/autoload.c
diff options
context:
space:
mode:
authorAmir Goldstein <[email protected]>2023-11-22 14:27:03 +0200
committerChristian Brauner <[email protected]>2023-11-24 09:22:28 +0100
commitb70d8e2b8ce56c79d9d18d20955e6de1631e9509 (patch)
tree718a4a20547849fcaaf94e9c86f98ad05a3a2861 /tools/testing/selftests/bpf/prog_tests/autoload.c
parentfeebea75bdf499aefd11d0df7b02d384a9f92fc1 (diff)
splice: move permission hook out of splice_file_to_pipe()
vfs_splice_read() has a permission hook inside rw_verify_area() and it is called from splice_file_to_pipe(), which is called from do_splice() and do_sendfile(). do_sendfile() already has a rw_verify_area() check for the entire range. do_splice() has a rw_verify_check() for the splice to file case, not for the splice from file case. Add the rw_verify_area() check for splice from file case in do_splice() and use a variant of vfs_splice_read() without rw_verify_area() check in splice_file_to_pipe() to avoid the redundant rw_verify_area() checks. This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Amir Goldstein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions