@@ -10,8 +10,7 @@
#include <linux/init.h>
#include <linux/module.h>
-
-#define FUSE_CTL_SUPER_MAGIC 0x65735543
+#include <linux/magic.h>
/*
* This is non-NULL when the single instance of the control filesystem
@@ -22,6 +22,7 @@
#include <linux/exportfs.h>
#include <linux/posix_acl.h>
#include <linux/pid_namespace.h>
+#include <linux/magic.h>
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
MODULE_DESCRIPTION("Filesystem in Userspace");
@@ -49,8 +50,6 @@ MODULE_PARM_DESC(max_user_congthresh,
"Global limit for the maximum congestion threshold an "
"unprivileged user can set");
-#define FUSE_SUPER_MAGIC 0x65735546
-
#define FUSE_DEFAULT_BLKSIZE 512
/** Maximum number of outstanding background requests */
@@ -90,4 +90,7 @@
#define BALLOON_KVM_MAGIC 0x13661366
#define ZSMALLOC_MAGIC 0x58295829
+#define FUSE_CTL_SUPER_MAGIC 0x65735543
+#define FUSE_SUPER_MAGIC 0x65735546
+
#endif /* __LINUX_MAGIC_H__ */
To be able to use FUSE_*SUPER_MAGIC macros in other subsystems like security/integrity/ima, we need to move the definitions from fs/fuse to include/uapi/linux/. The FUSE_*SUPER_MAGIC macros are made available to userspace in the same way as other filesystems. Cc: linux-fsdevel@vger.kernel.org Cc: linux-integrity@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Alban Crequy <alban@kinvolk.io> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Dongsu Park <dongsu@kinvolk.io> --- fs/fuse/control.c | 3 +-- fs/fuse/inode.c | 3 +-- include/uapi/linux/magic.h | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-)