linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Cc: Viacheslav Dubeyko <vdubeyko@redhat.com>,
	Patrick Donnelly <pdonnell@redhat.com>,
	"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
	"slava@dubeyko.com" <slava@dubeyko.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Gregory Farnum <gfarnum@redhat.com>,
	Alex Markuze <amarkuze@redhat.com>,
	"idryomov@gmail.com" <idryomov@gmail.com>,
	Pavan Rallabhandi <Pavan.Rallabhandi@ibm.com>
Subject: RE: [PATCH] ceph: fix kernel crash in ceph_open()
Date: Mon, 1 Dec 2025 20:04:31 +0000	[thread overview]
Message-ID: <6b405f0ea9e8cb38238d98f57eba9047ffb069c7.camel@ibm.com> (raw)
In-Reply-To: <CAPgWtC5Zk7sKnP_-jH3Oyb8LFajt_sXEVBgguFsurifQ8hzDBA@mail.gmail.com>

On Thu, 2025-11-27 at 13:03 +0530, Kotresh Hiremath Ravishankar wrote:
> On Tue, Nov 25, 2025 at 2:42 AM Viacheslav Dubeyko
> <Slava.Dubeyko@ibm.com> wrote:
> > 
> > On Tue, 2025-11-25 at 00:48 +0530, Kotresh Hiremath Ravishankar wrote:
> > > On Fri, Nov 21, 2025 at 1:47 AM Viacheslav Dubeyko
> > > <Slava.Dubeyko@ibm.com> wrote:
> > > > 
> > > > On Thu, 2025-11-20 at 19:50 +0530, Kotresh Hiremath Ravishankar wrote:
> > > > > Hi All,
> > > > > 
> > > > > I think the patch is necessary and fixes the crash. There is no harm
> > > > > in taking this patch as it behaves like an old kernel with this
> > > > > particular scenario.
> > > > > 
> > > > > When does the issue happen:
> > > > >    - The issue happens only when the old mount syntax is used where
> > > > > passing the file system name is optional in which case, it chooses the
> > > > > default mds namespace but doesn't get filled in the
> > > > > mdsc->fsc->mount_options->mds_namespace.
> > > > >    - Along with the above, the mount user should be non admin.
> > > > > Does it break the earlier fix ?
> > > > >    - Not fully!!! Though the open does succeed, the subsequent
> > > > > operation like write would get EPERM. I am not exactly able to
> > > > > recollect but this was discussed before writing the fix 22c73d52a6d0
> > > > > ("ceph: fix multifs mds auth caps issue"), it's guarded by another
> > > > > check before actual operation like write.
> > > > > 
> > > > > I think there are a couple of options to fix this cleanly.
> > > > >  1. Use the default fsname when
> > > > > mdsc->fsc->mount_options->mds_namespace is NULL during comparison.
> > > > >  2. Mandate passing the fsname with old syntax ?
> > > > > 
> > > > 
> > > > Anyway, we should be ready operate correctly if fsname or/and auth-
> > > > > match.fs_name are NULL. And if we need to make the fix more cleanly, then we
> > > > can introduce another patch with nicer fix.
> > > > 
> > > > I am not completely sure how default fsname can be applicable here. If I
> > > > understood the CephFS mount logic correctly, then fsname can be NULL during some
> > > > initial steps. But, finally, we will have the real fsname for comparison. But I
> > > > don't know if it's right of assuming that fsname == NULL is equal to fsname ==
> > > > default_name.
> > > 
> > > We are pretty sure fsname is NULL only if the old mount syntax is used
> > > without providing the
> > > fsname in the optional arg. I believe kclient knows the fsname that's
> > > mounted somewhere in this case ?
> > > I am not sure though. If so, it can be used. If not, then can we rely
> > > on what mds sends as part
> > > of the mdsmap?
> > > 
> > > 

<skipped>

> > 
> > > > 
> > > > And I am not sure that we can mandate anyone to use the old syntax. If there is
> > > > some other opportunity, then someone could use it. But, maybe, I am missing the
> > > > point. :) What do you mean by "Mandate passing the fsname with old syntax"?
> > > 
> > > In the old mount syntax, the fsname is passed as on optional argument
> > > using 'mds_namespace'.
> > > I was suggesting to mandate it if possible. But I guess it breaks
> > > backward compatibility.
> > > 
> > > > 
> > > > 
> > 
> > We had a private discussion with Ilya. Yes, he also mentioned the breaking of
> > backward compatibility for the case of mandating passing the fsname with old
> > syntax. He believes that: "Use the default fsname when mdsc->fsc->mount_options-
> > > mds_namespace is NULL during comparison seems like a sensible approach to me".
> > 
> > 

OK. So, what finally should we consider like a right solution/fix here?

Thanks,
Slava.

  reply	other threads:[~2025-12-01 20:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 19:37 [PATCH] ceph: fix kernel crash in ceph_open() Viacheslav Dubeyko
2025-11-19 22:40 ` Ilya Dryomov
2025-11-19 22:50   ` Viacheslav Dubeyko
     [not found]     ` <CAJ4mKGZexNm--cKsT0sc0vmiAyWrA1a6FtmaGJ6WOsg8d_2R3w@mail.gmail.com>
2025-11-19 23:16       ` Viacheslav Dubeyko
2025-11-20 14:20         ` Kotresh Hiremath Ravishankar
2025-11-20 20:17           ` Viacheslav Dubeyko
2025-11-24 19:18             ` Kotresh Hiremath Ravishankar
2025-11-24 21:12               ` Viacheslav Dubeyko
2025-11-27  7:33                 ` Kotresh Hiremath Ravishankar
2025-12-01 20:04                   ` Viacheslav Dubeyko [this message]
2025-12-02 11:30                     ` Ilya Dryomov
2025-12-02 20:21                       ` Patrick Donnelly
2025-12-03 19:48                         ` Viacheslav Dubeyko

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=6b405f0ea9e8cb38238d98f57eba9047ffb069c7.camel@ibm.com \
    --to=slava.dubeyko@ibm.com \
    --cc=Pavan.Rallabhandi@ibm.com \
    --cc=amarkuze@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=gfarnum@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=khiremat@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pdonnell@redhat.com \
    --cc=slava@dubeyko.com \
    --cc=vdubeyko@redhat.com \
    /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).