]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/zcrx: disallow user selected dmabuf offset and size
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 14 Jul 2025 10:57:23 +0000 (11:57 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 Jul 2025 14:54:43 +0000 (08:54 -0600)
commit08ca1409c4fa37ec93de08b9963390ed68a5ae8c
treed6cce797c035c73155d00ec0b8b33c0fa26a7449
parent9dff55ebaef7e94e5dedb6be28a1cafff65cc467
io_uring/zcrx: disallow user selected dmabuf offset and size

zcrx shouldn't be so frivolous about cutting a dmabuf sgtable and taking
a subrange into it, the dmabuf layer might be not expecting that. It
shouldn't be a problem for now, but since the zcrx dmabuf support is new
and there shouldn't be any real users, let's play safe and reject user
provided ranges into dmabufs. Also, it shouldn't be needed as userspace
should size them appropriately.

Fixes: a5c98e9424573 ("io_uring/zcrx: dmabuf backed zerocopy receive")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/be899f1afed32053eb2e2079d0da241514674aca.1752443579.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c