fuse: 32-bit user space ioctl compat for fuse device
authorAlessio Balsini <balsini@android.com>
Mon, 25 Jan 2021 15:30:51 +0000 (15:30 +0000)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 16 Mar 2021 14:20:16 +0000 (15:20 +0100)
commitf8425c9396639cc462bcce44b1051f8b4e62fddb
tree69f35483555a347f8fb83e31f6ca8ebb8809fb30
parent3f9b9efd82a84f27e95d0414f852caf1fa839e83
fuse: 32-bit user space ioctl compat for fuse device

With a 64-bit kernel build the FUSE device cannot handle ioctl requests
coming from 32-bit user space.  This is due to the ioctl command
translation that generates different command identifiers that thus cannot
be used for direct comparisons without proper manipulation.

Explicitly extract type and number from the ioctl command to enable 32-bit
user space compatibility on 64-bit kernel builds.

Signed-off-by: Alessio Balsini <balsini@android.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c
include/uapi/linux/fuse.h