Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chirantan Ekbote <chirantan@chromium.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Vivek Goyal <vgoyal@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com,
Dylan Reid <dgreid@chromium.org>,
Suleiman Souhlal <suleiman@chromium.org>,
fuse-devel@lists.sourceforge.net,
Chirantan Ekbote <chirantan@chromium.org>
Subject: [PATCHv3 1/2] uapi: fuse: Add FUSE_SECURITY_CTX
Date: Mon, 13 Jul 2020 18:09:20 +0900 [thread overview]
Message-ID: <20200713090921.312962-1-chirantan@chromium.org> (raw)
In-Reply-To: <20200610092744.140038-1-chirantan@chromium.org>
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.
---
include/uapi/linux/fuse.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 373cada898159..e2099b45fd44b 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -172,6 +172,10 @@
* - add FUSE_WRITE_KILL_PRIV flag
* - add FUSE_SETUPMAPPING and FUSE_REMOVEMAPPING
* - add map_alignment to fuse_init_out, add FUSE_MAP_ALIGNMENT flag
+ *
+ * 7.32
+ * - add FUSE_SECURITY_CTX flag for fuse_init_out
+ * - add security context to create, mkdir, symlink, and mknod requests
*/
#ifndef _LINUX_FUSE_H
@@ -207,7 +211,7 @@
#define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 31
+#define FUSE_KERNEL_MINOR_VERSION 32
/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
@@ -314,6 +318,7 @@ struct fuse_file_lock {
* FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
* FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
* FUSE_MAP_ALIGNMENT: map_alignment field is valid
+ * FUSE_SECURITY_CTX: add security context to create, mkdir, symlink, and mknod
*/
#define FUSE_ASYNC_READ (1 << 0)
#define FUSE_POSIX_LOCKS (1 << 1)
@@ -342,6 +347,7 @@ struct fuse_file_lock {
#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
#define FUSE_MAP_ALIGNMENT (1 << 26)
+#define FUSE_SECURITY_CTX (1 << 27)
/**
* CUSE INIT request/reply flags
--
2.27.0.383.g050319c2ae-goog
next prev parent reply other threads:[~2020-07-13 9:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 5:32 [PATCH] RFC: fuse: virtiofs: Call security hooks on new inodes Chirantan Ekbote
2020-06-02 18:23 ` Vivek Goyal
2020-06-10 9:27 ` [PATCH v2] RFC: fuse: " Chirantan Ekbote
2020-06-15 7:37 ` Chirantan Ekbote
2020-06-16 9:29 ` Miklos Szeredi
2020-06-16 9:41 ` Chirantan Ekbote
2020-06-16 10:27 ` Miklos Szeredi
2020-07-13 9:09 ` Chirantan Ekbote [this message]
2020-07-13 9:09 ` [PATCHv3 2/2] " Chirantan Ekbote
2020-07-13 9:56 ` [PATCHv4 1/2] uapi: fuse: Add FUSE_SECURITY_CTX Chirantan Ekbote
2020-07-13 9:57 ` [PATCHv4 2/2] fuse: Call security hooks on new inodes Chirantan Ekbote
2020-07-21 8:07 ` Chirantan Ekbote
2020-07-21 14:23 ` 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=20200713090921.312962-1-chirantan@chromium.org \
--to=chirantan@chromium.org \
--cc=dgreid@chromium.org \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=stefanha@redhat.com \
--cc=suleiman@chromium.org \
--cc=vgoyal@redhat.com \
--cc=virtio-fs@redhat.com \
--subject='Re: [PATCHv3 1/2] uapi: fuse: Add FUSE_SECURITY_CTX' \
/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).