[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YBFtXqgvcXW5fFCR@google.com>
Date: Wed, 27 Jan 2021 13:40:46 +0000
From: Alessio Balsini <balsini@...roid.com>
To: qxy <qxy65535@...il.com>
Cc: Alessio Balsini <balsini@...roid.com>,
Miklos Szeredi <miklos@...redi.hu>,
Akilesh Kailash <akailash@...gle.com>,
Amir Goldstein <amir73il@...il.com>,
Antonio SJ Musumeci <trapexit@...wn.link>,
David Anderson <dvander@...gle.com>,
Giuseppe Scrivano <gscrivan@...hat.com>,
Jann Horn <jannh@...gle.com>, Jens Axboe <axboe@...nel.dk>,
Martijn Coenen <maco@...roid.com>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Lawrence <paullawrence@...gle.com>,
Peng Tao <bergwolf@...il.com>,
Stefano Duo <duostefano93@...il.com>,
Zimuzo Ezeozue <zezeozue@...gle.com>, wuyan <wu-yan@....com>,
fuse-devel@...ts.sourceforge.net, kernel-team@...roid.com,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND V12 2/8] fuse: 32-bit user space ioctl compat for
fuse device
On Wed, Jan 27, 2021 at 08:15:19PM +0800, qxy wrote:
> Hi Allesio,
>
> Thank you for your supply for 32-bit user space.
> Actually we have already met this issue on our product and we resolved it
> like this:
>
> Project *platform/external/libfuse*
> diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
> index e9d4f1a..fe0cb6d 100644
> --- a/include/fuse_kernel.h
> +++ b/include/fuse_kernel.h
> @@ -562,7 +562,11 @@
> uint32_t fd;
> /* For future implementation */
> uint32_t len;
> - void * vec;
> + union {
> + void * vec;
> + /* compatible for 32-bit libfuse and 64-bit kernel */
> + uint64_t padding;
> + };
> };
>
> However, if we need to use *vec in the future, we still need to do more in
> 32-bit libfuse to work with 64-bit kernel :(
>
Good point.
What I had in mind as a possible use was the possibility of enabling
passthrough for only a few regions of the file, similar to fuse2.
But it doesn't really make sense to define the data structure fields for
uncertain future extensions, so what we could do is:
struct fuse_passthrough_out {
+ uint32_t size; // Size of this data structure
uint32_t fd;
- /* For future implementation */
- uint32_t len;
- void *vec;
};
Similar to what "struct sched_attr" does.
This is probably the most flexible solution, that would allow to extend
this data structure in the future with no headaches both in kernel and
user space.
What do you think?
Thanks!
Alessio
Powered by blists - more mailing lists