public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix return with MSG_TUNC overtruncating buffers
@ 2026-09-02 23:00 Gabriel Krisman Bertazi
  2026-09-02 23:00 ` [PATCH 1/2] io_uring/net: let io_recv_buf_select return the length of the buffer region Gabriel Krisman Bertazi
  2026-09-02 23:00 ` [PATCH 2/2] io_uring/net: don't overconsume buffers when using MSG_TRUNC Gabriel Krisman Bertazi
  0 siblings, 2 replies; 3+ messages in thread
From: Gabriel Krisman Bertazi @ 2026-09-02 23:00 UTC (permalink / raw)
  To: axboe; +Cc: io-uring, Gabriel Krisman Bertazi

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(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-02 23:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 23:00 [PATCH 0/2] Fix return with MSG_TUNC overtruncating buffers Gabriel Krisman Bertazi
2026-09-02 23:00 ` [PATCH 1/2] io_uring/net: let io_recv_buf_select return the length of the buffer region Gabriel Krisman Bertazi
2026-09-02 23:00 ` [PATCH 2/2] io_uring/net: don't overconsume buffers when using MSG_TRUNC Gabriel Krisman Bertazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox