mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gerd Rausch <gerd.rausch@oracle.com>
To: Allison Henderson <achender@kernel.org>,
	sungbyeongchan <tjdqudcks0424@naver.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Andy Grover <andy.grover@oracle.com>
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [rds-devel] [External] : Re: [PATCH net] RDS/IB: validate receive completion payload length
Date: Fri, 16 Oct 2026 13:18:58 -0700	[thread overview]
Message-ID: <7e69b862-7cad-443f-912b-ce2db7854d60@oracle.com> (raw)
In-Reply-To: <c1efb25a93739dfe2c16828bbcdc9bd7535850c1.camel@kernel.org>

Hi,

On 2026-10-06 18:13, Allison Henderson via rds-devel wrote:
>> --- a/net/rds/ib_recv.c
>> +++ b/net/rds/ib_recv.c
>> @@ -949,6 +949,15 @@ static void rds_ib_process_recv(struct rds_connection *conn,
>>  		}
>>  	}
>>  
>> +	if (data_len != min_t(u32, ic->i_recv_data_rem, RDS_FRAG_SIZE)) {
>> +		rds_ib_conn_error(conn,
>> +				  "incoming fragment payload length %u, expected %u; "
>> +				  "disconnecting and reconnecting\n",
>> +				  data_len,
>> +				  min_t(u32, ic->i_recv_data_rem, RDS_FRAG_SIZE));
>> +		goto done;
>> +	}
>> +
>>  	list_add_tail(&recv->r_frag->f_item, &ibinc->ii_frags);
>>  	recv->r_frag = NULL;
>>  
How does forcing a reconnect help this situation?

After the reconnect, the sender submits the exact same (incorrect) message again,
which it kept in "cp_retrans".

Therefore, the exact same conditional triggers again.

All but the last fragment of an RDS/IB message are expected to be of RDS_FRAG_SIZE.

While there's no good protocol specification (to the best of my knowledge),
posting an insufficiently large message can be seen as protocol violation.

Therefore, apart from security concerns, the previous behavior of garbage-in / garbage-out
is IMO better than this behavior of just endlessly forcing a reconnect.

If there's a strong desire to address this issue, the sender should be
told to discard the message. A reconnect doesn't address this issue.

Thanks,

   Gerd


  reply	other threads:[~2026-10-16 20:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 20:52 sungbyeongchan
2026-10-06 20:55 ` netdev-bot+sinfo
2026-10-07  1:13 ` Allison Henderson
2026-10-16 20:18   ` Gerd Rausch [this message]
2026-10-09 11:52 ` netdev-bot+sashiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e69b862-7cad-443f-912b-ce2db7854d60@oracle.com \
    --to=gerd.rausch@oracle.com \
    --cc=achender@kernel.org \
    --cc=andy.grover@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rds-devel@oss.oracle.com \
    --cc=tjdqudcks0424@naver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®