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.
--
Pavel Begunkov