All of lore.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
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ 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] 9+ messages in thread

end of thread, other threads:[~2026-09-10 20:42 UTC | newest]

Thread overview: 9+ 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
2026-09-09 13:56   ` Jens Axboe
2026-09-09 13:58     ` Jens Axboe
2026-09-10 16:08     ` Gabriel Krisman Bertazi
2026-09-10 16:11       ` Gabriel Krisman Bertazi
2026-09-10 20:42         ` Jens Axboe
2026-09-10 15:18 ` [PATCH 0/2] Fix return with MSG_TUNC overtruncating buffers Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.