From: Vivek Goyal <vgoyal@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Bernd Schubert <bschubert@ddn.com>,
linux-fsdevel@vger.kernel.org,
Jeffle Xu <jefflexu@linux.alibaba.com>,
Dharmendra Singh <dsingh@ddn.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
German Maglione <gmaglione@redhat.com>
Subject: Re: [PATCH] fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT flag
Date: Tue, 26 Apr 2022 09:01:44 -0400 [thread overview]
Message-ID: <YmftOLZ59j359zGG@redhat.com> (raw)
In-Reply-To: <CAJfpegsUfANp4a4gmAKLjenkdjoA-Gppja=LmwdF_1Gh3wdL4g@mail.gmail.com>
On Mon, Apr 25, 2022 at 10:09:48AM +0200, Miklos Szeredi wrote:
> On Sun, 24 Apr 2022 at 10:29, Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > On Thu, Apr 21, 2022 at 05:36:02PM +0200, Miklos Szeredi wrote:
> > > On Fri, 15 Apr 2022 at 13:54, Bernd Schubert <bschubert@ddn.com> wrote:
> > > >
> > > > This is just a safety precaution to avoid checking flags
> > > > on memory that was initialized on the user space side.
> > > > libfuse zeroes struct fuse_init_out outarg, but this is not
> > > > guranteed to be done in all implementations. Better is to
> > > > act on flags and to only apply flags2 when FUSE_INIT_EXT
> > > > is set.
> > > >
> > > > There is a risk with this change, though - it might break existing
> > > > user space libraries, which are already using flags2 without
> > > > setting FUSE_INIT_EXT.
> > > >
> > > > The corresponding libfuse patch is here
> > > > https://github.com/libfuse/libfuse/pull/662
> > > >
> > > >
> > > > Signed-off-by: Bernd Schubert <bschubert@ddn.com>
> > >
> > > Agreed, this is a good change. Applied.
> > >
> > > Just one comment: please consider adding "Fixes:" and "Cc:
> > > <stable@....>" tags next time. I added them now.
> >
> > I am afraid that this probably will break both C and rust version of
> > virtiofsd. I had a quick look and I can't seem to find these
> > implementations setting INIT_EXT flag in reply to init.
> >
> > I am travelling. Will check it more closely when I return next week.
> > If virtiofsd implementations don't set INIT_EXT, I would rather prefer
> > to not do this change and avoid breaking it.
>
> Okay, let's postpone this kernel patch until libfuse and virtiofsd
> implementations are updated.
Ok. I will work on fixing virtiofsd implementation. Even if we fix it,
then older versions will still be broken with newer kernels. I am
wondering, which clients are not setting flags2 to zero. And if they are
not setting it to zero, it sounds like a bug to me in fuse servers
instead and should probably be fixed there without breaking things for
existing users.
Agree that it probably is a nice change if we had introduced this in the
beginning itself. Its like extra saftey net. But now if we add it, it
will break things which is not nice. So at this point of time, it probably
is better to fix fuse servers instead and set ->flags2 to zero, IMHO.
Thanks
Vivek
next prev parent reply other threads:[~2022-04-26 13:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 11:53 [PATCH] fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT flag Bernd Schubert
2022-04-21 15:36 ` Miklos Szeredi
2022-04-21 16:28 ` Bernd Schubert
2022-04-24 8:29 ` Vivek Goyal
[not found] ` <DM5PR1901MB20375D0CF53C5F7D338154D0B5F99@DM5PR1901MB2037.namprd19.prod.outlook.com>
2022-04-24 11:32 ` JeffleXu
2022-04-25 8:09 ` Miklos Szeredi
2022-04-26 13:01 ` Vivek Goyal [this message]
2022-04-26 13:13 ` Miklos Szeredi
2022-04-26 13:24 ` Vivek Goyal
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=YmftOLZ59j359zGG@redhat.com \
--to=vgoyal@redhat.com \
--cc=bschubert@ddn.com \
--cc=dgilbert@redhat.com \
--cc=dsingh@ddn.com \
--cc=gmaglione@redhat.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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).