diff options
author | Amir Goldstein <[email protected]> | 2023-11-22 14:27:02 +0200 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2023-11-24 09:22:28 +0100 |
commit | feebea75bdf499aefd11d0df7b02d384a9f92fc1 (patch) | |
tree | 37614e8252ee18bc4931d95e8ed8491fdf7e292a /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 2a33e2ddc6ebf9b5468091aded8a38f57de9a580 (diff) |
splice: move permission hook out of splice_direct_to_actor()
vfs_splice_read() has a permission hook inside rw_verify_area() and
it is called from do_splice_direct() -> splice_direct_to_actor().
The callers of do_splice_direct() (e.g. vfs_copy_file_range()) already
call rw_verify_area() for the entire range, but the other caller of
splice_direct_to_actor() (nfsd) does not.
Add the rw_verify_area() checks in nfsd_splice_read() and use a
variant of vfs_splice_read() without rw_verify_area() check in
splice_direct_to_actor() to avoid the redundant rw_verify_area() checks.
This is needed for fanotify "pre content" events.
Acked-by: Chuck Lever <[email protected]>
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