linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Handle notifications on overlayfs fake path files
@ 2023-06-14  7:49 Amir Goldstein
  2023-06-14  7:49 ` [PATCH v4 1/2] fs: use backing_file container for internal files with "fake" f_path Amir Goldstein
  2023-06-14  7:49 ` [PATCH v4 2/2] ovl: enable fsnotify events on underlying real files Amir Goldstein
  0 siblings, 2 replies; 8+ messages in thread
From: Amir Goldstein @ 2023-06-14  7:49 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Jan Kara, Miklos Szeredi, Christoph Hellwig, David Howells,
	Al Viro, linux-fsdevel, linux-unionfs

Christain,

A little while ago, Jan and I realized that an unprivileged overlayfs
mount could be used to avert fanotify permission events that were
requested for an inode or sb on the underlying fs.

The [v1] patch set was an attempt to implement Miklos' suggestion
(opt-in to query the fake path) which turned out to affet the vfs in
many places, so Miklos and I agreed on a solution that will be less
intrusive for vfs (opt-in to query the real path).

The [v2] patch set took the less intrusive approach to vfs, but it
also tried a different approach of extending the d_real() interface,
which Miklos did not like.

The [v3] patch goes back to the less intrusive approach to vfs without
complicating d_real() interface, that Miklso and I agreed on during the
[v1] patch set review, so hopefully everyone can be happy with it.

This v4 patch set addresses review comments from yourself and from
Christoph on [v3].

Since the patches are 95% vfs, I think it is better if they are merged
through the vfs tree.

I am hoping to solicit an ACK from Jan and Miklos on the minor changes
in ovl and fsnotify in the 2nd patch.

Thanks,
Amir.

Changes since [v3]:
- Rename struct file_fake to backing_file
- Rename helpers to open_backing_file(), backing_file_real_path()
- Rename FMODE_FAKE_PATH to FMODE_BACKING
- Separate flag from FMODE_NOACCOUNT
- inline the fast-path branch of f_real_path()

Changes since [v2]:
- Restore the file_fake container (Miklos)
- Re-arrange the v1 helpers (Christian)

Changes since [v1]:
- Drop the file_fake container
- Leave f_path fake and special case only fsnotify

[v3] https://lore.kernel.org/linux-unionfs/20230611194706.1583818-1-amir73il@gmail.com/
[v2] https://lore.kernel.org/linux-unionfs/20230611132732.1502040-1-amir73il@gmail.com/
[v1] https://lore.kernel.org/linux-unionfs/20230609073239.957184-1-amir73il@gmail.com/

Amir Goldstein (2):
  fs: use backing_file container for internal files with "fake" f_path
  ovl: enable fsnotify events on underlying real files

 fs/cachefiles/namei.c    |  4 +--
 fs/file_table.c          | 74 +++++++++++++++++++++++++++++++++++-----
 fs/internal.h            |  5 +--
 fs/open.c                | 30 +++++++++-------
 fs/overlayfs/file.c      |  8 ++---
 include/linux/fs.h       | 24 ++++++++++---
 include/linux/fsnotify.h |  3 +-
 7 files changed, 113 insertions(+), 35 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-15 11:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14  7:49 [PATCH v4 0/2] Handle notifications on overlayfs fake path files Amir Goldstein
2023-06-14  7:49 ` [PATCH v4 1/2] fs: use backing_file container for internal files with "fake" f_path Amir Goldstein
2023-06-14 13:26   ` Christian Brauner
2023-06-14 13:48     ` Amir Goldstein
2023-06-15 11:32     ` Amir Goldstein
2023-06-15  4:24   ` Christoph Hellwig
2023-06-14  7:49 ` [PATCH v4 2/2] ovl: enable fsnotify events on underlying real files Amir Goldstein
2023-06-14  9:54   ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).