Re: [PATCH v3 1/2] RDMA/srpt: bound the indirect descriptor table to the IU
From: Yehyeong Lee
Date: Thu Oct 22 2026 - 14:16:04 EST
Thanks, I will switch desc_off to a uintptr_t subtraction.
The room check is also wrong for a short IU, as Sashiko noted and as the
commit message wrongly denies. The division truncates toward zero, so a
byte_len one to fifteen bytes short of the header gives room zero rather
than negative, and a table_desc.len below one descriptor gives nbufs
zero, so nbufs > room is false and the truncated request is not refused.
v4 drops the division and compares the span the table needs,
desc_off + sizeof(*idb) + nbufs * sizeof(struct srp_direct_buf), against
recv_ioctx->byte_len, which refuses a short IU with no reliance on sign
or truncation.