aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/fuse.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2019-09-04 08:36:33 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2019-09-12 14:59:41 +0200
commit501ae8ecae2ba5122774dee4445003505a7fd01b (patch)
treeefc4bec9cf41a6994df88f5ed0e1acbd65b35692 /include/uapi/linux/fuse.h
parentfuse: allow skipping control interface and forced unmount (diff)
downloadlinux-dev-501ae8ecae2ba5122774dee4445003505a7fd01b.tar.xz
linux-dev-501ae8ecae2ba5122774dee4445003505a7fd01b.zip
fuse: reserve byteswapped init opcodes
virtio fs tunnels fuse over a virtio channel. One issue is two sides might be speaking different endian-ness. To detects this, host side looks at the opcode value in the FUSE_INIT command. Works fine at the moment but might fail if a future version of fuse will use such an opcode for initialization. Let's reserve this opcode so we remember and don't do this. Same for CUSE_INIT. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/uapi/linux/fuse.h')
-rw-r--r--include/uapi/linux/fuse.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 2971d29a42e4..df2e12fb3381 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -425,6 +425,10 @@ enum fuse_opcode {
/* CUSE specific operations */
CUSE_INIT = 4096,
+
+ /* Reserved opcodes: helpful to detect structure endian-ness */
+ CUSE_INIT_BSWAP_RESERVED = 1048576, /* CUSE_INIT << 8 */
+ FUSE_INIT_BSWAP_RESERVED = 436207616, /* FUSE_INIT << 24 */
};
enum fuse_notify_code {