Skip to content

Fix return with MSG_TUNC overtruncating buffers

Gabriel Krisman Bertazi io-uring stable 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2io_uring/net: let io_recv_buf_select return the length of the buffer regionio_uring/net.c+6 -40 replies
2/2io_uring/net: don't overconsume buffers when using MSG_TRUNCio_uring/net.c+31 -75 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Fix return with MSG_TUNC overtruncating buffers

Jens,

This is an attempt to fix the issue reported at [1]. It works by splitting the return size (which can be the full size of the packet) from the value actually commited in the buffer. Please, let me know your thoughts. Patch 1 is a small preparation and patch 2 has the fix.

This was tested for regressions against liburing as well as using the reproducer from the bug, which I can turn into a proper test case against liburing.

I sent this before but the submission was botched. Please take this version in consideration.

Thanks,

[1] https://github.com/axboe/liburing/issues/1619

Gabriel Krisman Bertazi (2):
io_uring/net: let io_recv_buf_select return the length of the buffer
region
io_uring/net: don't overconsume buffers when using MSG_TRUNC

 io_uring/net.c | 48 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 11 deletions(-)
Signature · 1 line
2.55.0