On 1/16/19 3:45 AM, Arnd Bergmann wrote: > On Tue, Jan 15, 2019 at 3:56 AM Jens Axboe <axboe@xxxxxxxxx> wrote: > >> @@ -132,4 +139,12 @@ struct io_uring_register_buffers { >> __u32 nr_iovecs; >> }; >> >> +struct io_uring_register_files { >> + union { >> + __s32 *fds; >> + __u64 pad; >> + }; >> + __u32 nr_fds; >> +}; > > I think you should either remove the pad field here, or pass the pointer > using a __u64 argument itself. With the current definition, the ioctl > command code is the same between 32-bit and 64-bit architectures > (since the length is the same on anything other than x86), but the > structures are incompatible. Ah ok, I think I'm starting to follow. Thanks Arnd, that's useful. I'll make the changes throughout the structs. > I would also suggest adding an explicit 32-bit pad field at the end > of the structure, to avoid the implicit padding on non-i386 machines. That's a good point, I'll make that change, that was an oversight. -- Jens Axboe