On Mon, Jun 21, 2021 at 11:46 AM Omar Sandoval <osandov@xxxxxxxxxxx> wrote: > > How do we get the userspace size with the encoded_iov.size approach? > We'd have to read the size from the iov_iter before writing to the rest > of the iov_iter. Is it okay to mix the iov_iter as a source and > destination like this? From what I can tell, it's not intended to be > used like this. I guess it could work that way, but yes, it's ugly as hell. And I really don't want a readv() system call - that should write to the result buffer - to first have to read from it. So I think the original "just make it be the first iov entry" is the better approach, even if Al hates it. Although I still get the feeling that using an ioctl is the *really* correct way to go. That was my first reaction to the series originally, and I still don't see why we'd have encoded data in a regular read/write path. What was the argument against ioctl's, again? To me, this isn't all that different from the fsverity things we added, where filesystem people were happy to try to work out some common model and add FS_IOC_*_VERITY* ioctls. Linus