From d98d9f83c075242d5474ad71b36e675031dd18f0 Mon Sep 17 00:00:00 2001 From: Alessio Balsini Date: Thu, 28 Jan 2021 19:48:23 +0000 Subject: [PATCH] FROMLIST: fuse: Allocate unlikely used ioctl number for passthrough V1 The current UAPI interface for FUSE passthrough is still under discussion upstream, thus we are reserving this ioctl number to avoid future conflicts with user space binaries. The user space implementation in Android will take care of doing all the checking to fall into the most appropriate ioctl number. Bug: 167695973 Link: https://lore.kernel.org/lkml/20210125153057.3623715-3-balsini@android.com/ Fixes: 9634f0e4e203 ("FROMLIST: fuse: Definitions and ioctl for passthrough") Test: manual test with additional printks Signed-off-by: Alessio Balsini Change-Id: I658c5ab2ebfe2b76d20685a099ac1b1fee3549cc --- include/uapi/linux/fuse.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 3d4cf160585f..c9f98e225db6 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h @@ -810,6 +810,7 @@ struct fuse_in_header { uint32_t padding; }; +/* fuse_passthrough_out for passthrough V1 */ struct fuse_passthrough_out { uint32_t fd; /* For future implementation */ @@ -894,7 +895,8 @@ struct fuse_notify_retrieve_in { /* Device ioctls: */ #define FUSE_DEV_IOC_MAGIC 229 #define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t) -#define FUSE_DEV_IOC_PASSTHROUGH_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 1, struct fuse_passthrough_out) +/* 127 is reserved for the V1 interface implementation in Android */ +#define FUSE_DEV_IOC_PASSTHROUGH_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 127, struct fuse_passthrough_out) struct fuse_lseek_in { uint64_t fh;