From: Vivek Goyal <vgoyal@redhat.com>
To: Chirantan Ekbote <chirantan@chromium.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
Stephen Smalley <stephen.smalley.work@gmail.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
virtio-fs-list <virtio-fs@redhat.com>,
Dylan Reid <dgreid@chromium.org>,
Suleiman Souhlal <suleiman@chromium.org>,
fuse-devel <fuse-devel@lists.sourceforge.net>,
SElinux list <selinux@vger.kernel.org>
Subject: Re: [RESEND] [PATCHv4 1/2] uapi: fuse: Add FUSE_SECURITY_CTX
Date: Tue, 15 Jun 2021 09:32:41 -0400 [thread overview]
Message-ID: <20210615133241.GA965196@redhat.com> (raw)
In-Reply-To: <CAJFHJrpu9vewcD2er6oB_xwtF4Pc-njkRaA7rfJwsTvw5Fi2og@mail.gmail.com>
On Tue, Jun 15, 2021 at 06:35:21PM +0900, Chirantan Ekbote wrote:
> Hi Vivek,
>
> On Tue, Jun 15, 2021 at 6:28 AM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > On Wed, Jul 22, 2020 at 06:07:57PM +0900, Chirantan Ekbote wrote:
> > > Add the FUSE_SECURITY_CTX flag for the `flags` field of the
> > > fuse_init_out struct. When this flag is set the kernel will append the
> > > security context for a newly created inode to the request (create,
> > > mkdir, mknod, and symlink). The server is responsible for ensuring that
> > > the inode appears atomically with the requested security context.
> > >
> > > For example, if the server is backed by a "real" linux file system then
> > > it can write the security context value to
> > > /proc/thread-self/attr/fscreate before making the syscall to create the
> > > inode.
> > >
> > > Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
> >
> > Hi Chirantan,
> >
> > I am wondering what's the status of this work now. Looks like it
> > was not merged.
> >
> > We also need the capability to set selinux security xattrs on newly
> > created files in virtiofs.
> >
> > Will you be interested in reviving this work and send patches again
> > and copy the selinux as well as linux security module list
> > (linux-security-module@vger.kernel.org) as suggested by casey.
> >
>
> Not really. We have our own local solution for this (see below) so if
> you or someone else wants to pick it up, please go ahead.
>
Ok.
> > How are you managing in the meantime. Carrying patches in your own
> > kernel?
> >
>
> Kind of. This patch series changes the protocol and the feature bit we
> were using was claimed by FUSE_SUBMOUNTS instead so carrying it
> locally is not really viable long term. Instead we're carrying a
> patch similar to the original RFC patch that doesn't change the
> protocol [1].
Ok, got it. So you went ahead for simpler solution of setting security
xattr after creating file hence making it non-atomic. But changelog
suggests that it works for your use case as you always do a restorecon
on reboot.
But I guess upstream will need a solution where file creation and
security xattr setting can be atomic.
Thanks. If time permits, I might look into the patches you had posted.
Thanks
Vivek
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Chirantan Ekbote <chirantan@chromium.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
fuse-devel <fuse-devel@lists.sourceforge.net>,
Stephen Smalley <stephen.smalley.work@gmail.com>,
Suleiman Souhlal <suleiman@chromium.org>,
virtio-fs-list <virtio-fs@redhat.com>,
SElinux list <selinux@vger.kernel.org>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
Dylan Reid <dgreid@chromium.org>
Subject: Re: [Virtio-fs] [RESEND] [PATCHv4 1/2] uapi: fuse: Add FUSE_SECURITY_CTX
Date: Tue, 15 Jun 2021 09:32:41 -0400 [thread overview]
Message-ID: <20210615133241.GA965196@redhat.com> (raw)
In-Reply-To: <CAJFHJrpu9vewcD2er6oB_xwtF4Pc-njkRaA7rfJwsTvw5Fi2og@mail.gmail.com>
On Tue, Jun 15, 2021 at 06:35:21PM +0900, Chirantan Ekbote wrote:
> Hi Vivek,
>
> On Tue, Jun 15, 2021 at 6:28 AM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > On Wed, Jul 22, 2020 at 06:07:57PM +0900, Chirantan Ekbote wrote:
> > > Add the FUSE_SECURITY_CTX flag for the `flags` field of the
> > > fuse_init_out struct. When this flag is set the kernel will append the
> > > security context for a newly created inode to the request (create,
> > > mkdir, mknod, and symlink). The server is responsible for ensuring that
> > > the inode appears atomically with the requested security context.
> > >
> > > For example, if the server is backed by a "real" linux file system then
> > > it can write the security context value to
> > > /proc/thread-self/attr/fscreate before making the syscall to create the
> > > inode.
> > >
> > > Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
> >
> > Hi Chirantan,
> >
> > I am wondering what's the status of this work now. Looks like it
> > was not merged.
> >
> > We also need the capability to set selinux security xattrs on newly
> > created files in virtiofs.
> >
> > Will you be interested in reviving this work and send patches again
> > and copy the selinux as well as linux security module list
> > (linux-security-module@vger.kernel.org) as suggested by casey.
> >
>
> Not really. We have our own local solution for this (see below) so if
> you or someone else wants to pick it up, please go ahead.
>
Ok.
> > How are you managing in the meantime. Carrying patches in your own
> > kernel?
> >
>
> Kind of. This patch series changes the protocol and the feature bit we
> were using was claimed by FUSE_SUBMOUNTS instead so carrying it
> locally is not really viable long term. Instead we're carrying a
> patch similar to the original RFC patch that doesn't change the
> protocol [1].
Ok, got it. So you went ahead for simpler solution of setting security
xattr after creating file hence making it non-atomic. But changelog
suggests that it works for your use case as you always do a restorecon
on reboot.
But I guess upstream will need a solution where file creation and
security xattr setting can be atomic.
Thanks. If time permits, I might look into the patches you had posted.
Thanks
Vivek
next prev parent reply other threads:[~2021-06-15 13:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 9:07 [RESEND] [PATCHv4 1/2] uapi: fuse: Add FUSE_SECURITY_CTX Chirantan Ekbote
2020-07-22 9:07 ` [Virtio-fs] " Chirantan Ekbote
2020-07-22 9:07 ` [RESEND] [PATCHv4 2/2] fuse: Call security hooks on new inodes Chirantan Ekbote
2020-07-22 9:07 ` [Virtio-fs] " Chirantan Ekbote
2020-08-14 5:20 ` [RESEND] [PATCHv4 1/2] uapi: fuse: Add FUSE_SECURITY_CTX Chirantan Ekbote
2020-08-14 5:20 ` [Virtio-fs] " Chirantan Ekbote
2020-08-14 15:44 ` Casey Schaufler
2020-08-14 15:44 ` [Virtio-fs] " Casey Schaufler
2021-06-14 21:28 ` Vivek Goyal
2021-06-14 21:28 ` [Virtio-fs] " Vivek Goyal
2021-06-15 9:35 ` Chirantan Ekbote
2021-06-15 9:35 ` [Virtio-fs] " Chirantan Ekbote
2021-06-15 13:32 ` Vivek Goyal [this message]
2021-06-15 13:32 ` 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=20210615133241.GA965196@redhat.com \
--to=vgoyal@redhat.com \
--cc=chirantan@chromium.org \
--cc=dgreid@chromium.org \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=selinux@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=stephen.smalley.work@gmail.com \
--cc=suleiman@chromium.org \
--cc=virtio-fs@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 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.