mbox series

[0/2] io_uring: mshot read fix for buffer size changes

Message ID 20231105223008.125563-1-dyudaken@gmail.com (mailing list archive)
Headers show
Series io_uring: mshot read fix for buffer size changes | expand

Message

Dylan Yudaken Nov. 5, 2023, 10:30 p.m. UTC
Hi,

This series fixes a bug (will send a liburing patch separately showing
it) where the used buffer size is clamped to the minimum of all the
previous buffers selected.

It also as part of this forces the multishot read API to set addr &
len to 0.
len should probably have some accounting post-processing if it has
meaning to set it to non-zero, but I think for a new API it is simpler
to overly-constrain it upfront?

addr is useful to force to zero as it will allow some more bits to be
used in `struct io_rw`, which is otherwise full.

Dylan Yudaken (2):
  io_uring: do not allow multishot read to set addr or len
  io_uring: do not clamp read length for multishot read

 io_uring/rw.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Jens Axboe Nov. 6, 2023, 8:35 p.m. UTC | #1
On 11/5/23 3:30 PM, Dylan Yudaken wrote:
> Hi,
> 
> This series fixes a bug (will send a liburing patch separately showing
> it) where the used buffer size is clamped to the minimum of all the
> previous buffers selected.

Oh, if you have time and once we get v2 in, maybe send a patch for
liburing as well to remove 'nbytes' from io_uring_prep_read_multishot()
as well?