linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-unionfs@vger.kernel.org
Subject: Re: [GIT PULL] overlayfs fixes for 5.14-rc6
Date: Mon, 9 Aug 2021 14:25:17 -0700	[thread overview]
Message-ID: <CAHk-=wigKQqEqt9ev_1k5b_DwFGp7JmCdCR1xFSJjOyisEJ61A@mail.gmail.com> (raw)
In-Reply-To: <YRFfGk5lHL0W27oU@miu.piliscsaba.redhat.com>

On Mon, Aug 9, 2021 at 10:00 AM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
>       ovl: fix mmap denywrite

Ugh. Th edances with denywrite and mapping_unmap_writable are really
really annoying.

I've pulled this, but I really get the feeling that there's duplicated
code for these things, and that all the "if error goto" cases  (some
old, some new) are really really uglky.

I get the feeling that the whole thing with deny_write_access and
mapping_map_writable could possibly be done after-the-fact somehow as
part of actually inserting the vma in the vma tree, rather than done
as the vma is prepared.

And most users of vma_set_file() probably really don't want that whole
thing at all (ie the DRM stuff that just switches out a local thing.
They also don't check for the new error cases you've added.

So I really think this is quite questionable, and those cases should
probably have been done entirely inside ovlfs rather than polluting
the cases that don't care and don't check.

                 Linus

  reply	other threads:[~2021-08-09 21:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 17:00 Miklos Szeredi
2021-08-09 21:25 ` Linus Torvalds [this message]
2021-08-09 21:26   ` Linus Torvalds
2021-08-09 22:32     ` Matthew Wilcox
2021-08-10  5:13       ` Miklos Szeredi

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='CAHk-=wigKQqEqt9ev_1k5b_DwFGp7JmCdCR1xFSJjOyisEJ61A@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --subject='Re: [GIT PULL] overlayfs fixes for 5.14-rc6' \
    /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

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).