mbox series

[v3,0/5] Prepare for fsnotify pre-content permission events

Message ID 20231212094440.250945-1-amir73il@gmail.com (mailing list archive)
Headers show
Series Prepare for fsnotify pre-content permission events | expand

Message

Amir Goldstein Dec. 12, 2023, 9:44 a.m. UTC
Hi Christian,

This v3 of pre-content event prep patches addresses some comments and
replaces the v1 patches [1] that are currently applied to vfs.rw.

I started with a new cleanup patch for ssize_t return type that you
suggested.

Patch 2 has a fix for a build error reported by kernel tests robot
(moved MAX_RW_COUNT capping to splice_file_range()), so I did not
retain Josef's RVB from v1 on this patch.

Patches 3,4 are unchanged and retain the RVBs from v1.

Patch 5 changes the fsnotify hook name, so I did not retain Josef's
RVB from v1. Jan has already reviewed v2.

Thanks,
Amir.

Changes since v2:
- Fixes to splice helpers return type
- Add RVBs from Jan

Changes since v1 [1]:
- Move MAX_RW_COUNT capping to splice_file_range() to fix build error
- Cleanup splice helpers return type
- Change fsnotify hook name to fsnotify_file_area_perm()
- Add RVBs

[1] https://lore.kernel.org/r/20231207123825.4011620-1-amir73il@gmail.com/

Amir Goldstein (5):
  splice: return type ssize_t from all helpers
  fs: use splice_copy_file_range() inline helper
  fsnotify: split fsnotify_perm() into two hooks
  fsnotify: assert that file_start_write() is not held in permission
    hooks
  fsnotify: optionally pass access range in file permission hooks

 fs/ceph/file.c           |   4 +-
 fs/fuse/file.c           |   5 +-
 fs/internal.h            |   8 +--
 fs/nfs/nfs4file.c        |   5 +-
 fs/open.c                |   4 ++
 fs/overlayfs/copy_up.c   |   2 +-
 fs/read_write.c          |  46 ++++------------
 fs/readdir.c             |   4 ++
 fs/remap_range.c         |   8 ++-
 fs/smb/client/cifsfs.c   |   5 +-
 fs/splice.c              | 110 ++++++++++++++++++++-------------------
 include/linux/fs.h       |   3 --
 include/linux/fsnotify.h |  50 ++++++++++++------
 include/linux/splice.h   |  50 ++++++++++--------
 io_uring/splice.c        |   4 +-
 security/security.c      |  10 +---
 16 files changed, 163 insertions(+), 155 deletions(-)

Comments

Christian Brauner Dec. 12, 2023, 1:34 p.m. UTC | #1
On Tue, 12 Dec 2023 11:44:35 +0200, Amir Goldstein wrote:
> This v3 of pre-content event prep patches addresses some comments and
> replaces the v1 patches [1] that are currently applied to vfs.rw.
> 
> I started with a new cleanup patch for ssize_t return type that you
> suggested.
> 
> Patch 2 has a fix for a build error reported by kernel tests robot
> (moved MAX_RW_COUNT capping to splice_file_range()), so I did not
> retain Josef's RVB from v1 on this patch.
> 
> [...]

Applied to the vfs.rw branch of the vfs/vfs.git tree.
Patches in the vfs.rw branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.rw

[1/5] splice: return type ssize_t from all helpers
      https://git.kernel.org/vfs/vfs/c/a6d2318cae6e
[2/5] fs: use splice_copy_file_range() inline helper
      https://git.kernel.org/vfs/vfs/c/4a919d911118
[3/5] fsnotify: split fsnotify_perm() into two hooks
      https://git.kernel.org/vfs/vfs/c/3e646f9506aa
[4/5] fsnotify: assert that file_start_write() is not held in permission hooks
      https://git.kernel.org/vfs/vfs/c/8cf3ca861605
[5/5] fsnotify: optionally pass access range in file permission hooks
      https://git.kernel.org/vfs/vfs/c/d140b20ab863