From: Amir Goldstein <amir73il@gmail.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>, Miklos Szeredi <miklos@szeredi.hu>,
Christoph Hellwig <hch@lst.de>,
David Howells <dhowells@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: [PATCH v5 0/5] Handle notifications on overlayfs fake path files
Date: Thu, 15 Jun 2023 14:22:24 +0300 [thread overview]
Message-ID: <20230615112229.2143178-1-amir73il@gmail.com> (raw)
Christian,
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 v5 patch set addresses review comments from yourself and from
Christoph on [v3] and [v4].
Since the patches are 95% vfs, I think it is better if they are merged
through the vfs tree.
I am still hoping to solicit an ACK from Miklos on the ovl change
in the last patch.
Thanks,
Amir.
Changes since [v4]:
- ACK from Jan for fsnotify patch
- Do not use backing_file for cachefiles (brauner)
- Consistent naming scheme *_*file_open() (brauner)
- Split patches and better documentation (hch)
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
[v4] https://lore.kernel.org/linux-unionfs/20230614074907.1943007-1-amir73il@gmail.com/
[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 (5):
fs: rename {vfs,kernel}_tmpfile_open()
fs: use a helper for opening kernel internal files
fs: move kmem_cache_zalloc() into alloc_empty_file*() helpers
fs: use backing_file container for internal files with "fake" f_path
ovl: enable fsnotify events on underlying real files
fs/cachefiles/namei.c | 10 ++---
fs/file_table.c | 91 ++++++++++++++++++++++++++++++++--------
fs/internal.h | 5 ++-
fs/namei.c | 24 ++++++-----
fs/open.c | 75 ++++++++++++++++++++++++++++-----
fs/overlayfs/file.c | 8 ++--
fs/overlayfs/overlayfs.h | 5 ++-
include/linux/fs.h | 32 ++++++++++----
include/linux/fsnotify.h | 3 +-
9 files changed, 192 insertions(+), 61 deletions(-)
--
2.34.1
next reply other threads:[~2023-06-15 11:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 11:22 Amir Goldstein [this message]
2023-06-15 11:22 ` [PATCH v5 1/5] fs: rename {vfs,kernel}_tmpfile_open() Amir Goldstein
2023-06-16 7:04 ` Christoph Hellwig
2023-06-15 11:22 ` [PATCH v5 2/5] fs: use a helper for opening kernel internal files Amir Goldstein
2023-06-16 7:06 ` Christoph Hellwig
2023-06-15 11:22 ` [PATCH v5 3/5] fs: move kmem_cache_zalloc() into alloc_empty_file*() helpers Amir Goldstein
2023-06-16 7:07 ` Christoph Hellwig
2023-06-15 11:22 ` [PATCH v5 4/5] fs: use backing_file container for internal files with "fake" f_path Amir Goldstein
2023-06-16 7:15 ` Christoph Hellwig
2023-06-16 7:44 ` Amir Goldstein
2023-06-15 11:22 ` [PATCH v5 5/5] ovl: enable fsnotify events on underlying real files Amir Goldstein
2023-06-20 10:57 ` [PATCH v5 0/5] Handle notifications on overlayfs fake path files Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230615112229.2143178-1-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=dhowells@redhat.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).