Am Wed, 2 Jun 2021 13:41:02 +0200 schrieb Juergen Gross : > Shouldn't you check for zero length iovec elements as in the > writev_exact() case then? It is not clear to me what the purpose of skipping zero-length iov's at the beginning of the iov array in writev_exact is. I assume the syscall (or libc) will just skip them anyway. The code would not handle empty iov's in the middle of the array. Perhaps writev_exact should be done in the same way as my readv_exact, that would also remove the need for malloc. I think in the past I had a patch to do just that. Maybe just locally, maybe I sent it to this list. In case of readv_exact, only the trailing incomplete iov will be filled with read_exact. I think the length parameter for read_exact can not become zero, "len" would already be zero. Zero-length iov's will be skipped by the loop AFAICS. Olaf