All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chakra Divi <chakragithub@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fuse:rely on fuse_perm for exec when no mode bits set
Date: Fri, 8 May 2020 15:43:54 +0530	[thread overview]
Message-ID: <CAH7=fosn3fnNBkKzHNBSvoQh+Gjpi2J0mZ3rRENitMmFmpHcUw@mail.gmail.com> (raw)
In-Reply-To: <CAJfpegvWBHootLiE_zsw35G6Ee387V=Da_wCzaV9NhZQVDKYGg@mail.gmail.com>

On Tue, Apr 28, 2020 at 1:51 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Mon, Apr 27, 2020 at 3:46 PM Chakra Divi <chakragithub@gmail.com> wrote:
> >
> > On Tue, Apr 21, 2020 at 4:21 PM Chakra Divi <chakragithub@gmail.com> wrote:
> > >
> > > On Mon, Apr 20, 2020 at 4:55 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
> > > >
> > > > On Wed, Apr 1, 2020 at 11:31 AM Chakra Divi <chakragithub@gmail.com> wrote:
> > > > >
> > > > > In current code, for exec we are checking mode bits
> > > > > for x bit set even though the fuse_perm_getattr returns
> > > > > success. Changes in this patch avoids mode bit explicit
> > > > > check, leaves the exec checking to fuse file system
> > > > > in uspace.
> > > >
> > > > Why is this needed?
> > >
> > > Thanks for responding Miklos. We have an use case with our remote file
> > > system mounted on fuse , where permissions checks will happen remotely
> > > without the need of mode bits. In case of read, write it worked
> > > without issues. But for executable files, we found that fuse kernel is
> > > explicitly checking 'x' mode bit set on the file. We want this
> > > checking also to be pushed to remote instead of kernel doing it - so
> > > modified the kernel code to send getattr op to usespace in exec case
> > > too.
> >
> > Any help on this Miklos....
>
> I still don't understand what you are requesting.  What your patch
> does is unconditionally allow execution, even without any 'x' bits in
> the mode.  What does that achieve?

Thanks for the help Miklos. We have a network based filesystem that
supports acls.
As our filesystem give granular access, we wipe out the mode bits and
completely rely on ACLs.

Fuse works well for all other ops (with default_permissions disabled )
 as all the checks are done at the filesystems.
But only executables have problems because fuse kernel rejects the
execution by doing access checks on mode bit.
To push this check to filesystem, in the above patch - i'm relying on
return value from fuse_perm_getattr() ignoring the mode bits.

When the fuse module is asked to rely on filesystem for access checks,
why do we need this explicit check for executables?
I found out that it is the same issue with nfs too. Is there a reason
for it ? Should we not push this check to filesystem ?

Thanks,
Chakra
>
> Thanks,
> Miklos

  reply	other threads:[~2020-05-08 10:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01  9:31 [PATCH] fuse:rely on fuse_perm for exec when no mode bits set Chakra Divi
2020-04-20 11:25 ` Miklos Szeredi
2020-04-21 10:51   ` Chakra Divi
2020-04-27 13:46     ` Chakra Divi
2020-04-28  8:21       ` Miklos Szeredi
2020-05-08 10:13         ` Chakra Divi [this message]
2020-05-11 12:25           ` 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='CAH7=fosn3fnNBkKzHNBSvoQh+Gjpi2J0mZ3rRENitMmFmpHcUw@mail.gmail.com' \
    --to=chakragithub@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.