On 2/21/25 6:06 PM, Pavel Begunkov wrote: > On 2/22/25 00:52, Jens Axboe wrote: >>>> @@ -1250,6 +1251,12 @@ int io_recvzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) >>>> zc->ifq = req->ctx->ifq; >>>> if (!zc->ifq) >>>> return -EINVAL; >>>> + zc->len = READ_ONCE(sqe->len); >>>> + if (zc->len == UINT_MAX) >>>> + return -EINVAL; >>> >>> The uapi gives u32, if we're using a special value it should >>> match the type. ~(u32)0 >> >> Any syscall in Linux is capped at 2G anyway, so I think all of this > > I don't see how it related, you don't have to have a weird > 00111111b as a special value. > >> special meaning of ->len just needs to go away. Just ask for whatever >> bytes you want, but yes more than 2G will not be supported anyway. > > That's not the case here, the request does support more than 2G, > it's just spread across multiple CQEs, and the limit accounts > for multiple CQEs. All pretty moot if we just go with 0 as the "transfer whatever length you want", as obviously each individual transfer will be limited anyway. Which is the better choice than having some odd 4G value. -- Jens Axboe