Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 1 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] rxrpc_adjust_mtu() in net/rxrpc/peer_event.c: when the ICMP carries no MTU (mtu == 0), the function estimates one with `mtu =… - [Low] The note that the bug was found with an AI-driven tool (Quality Playbook running Claude) and that the fix was drafted with an AI… -- rxrpc: Fix max_data reduction on an oversized ICMPv6 PTB This patch changes the max_data calculation in rxrpc_adjust_mtu(). The old code was max_t(int, mtu - peer->hdrsize, 500). The new code is an explicit unsigned comparison against hdrsize followed by max(..., 500U). With this, an oversized ICMPv6 Packet Too Big no longer floors max_data to 500.
> Fixes: eeaedc5449d9 ("rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899)") > Signed-off-by: Andrew Stellman <aste…@stellman-greene.com> > > ---
[ ... ]
> Found with Quality Playbook > (https://github.com/andrewstellman/quality-playbook) running Claude > Opus 5.5; the fix was drafted with OpenAI GPT-6 (Codex).
[Severity: Low] This isn't a bug, but the tool disclosure is below the --- separator, so git am drops it. The applied commit message ends at the Signed-off-by line. Documentation/process/generated-content.rst says: if a tool was used to find a problem addressed by a change, that should be noted in the changelog. Could the note that the bug was found and the fix drafted with these tools be moved into the commit message body?
> diff --git a/net/rxrpc/peer_event.c b/net/rxrpc/peer_event.c > index 9d02448ac062c..5e9cd4adc478e 100644 > --- a/net/rxrpc/peer_event.c > +++ b/net/rxrpc/peer_event.c > @@ -122,7 +122,10 @@ static void rxrpc_adjust_mtu(struct rxrpc_peer *peer, unsigned int mtu) > } > } > > - max_data = max_t(int, mtu - peer->hdrsize, 500); > + if (mtu <= peer->hdrsize) > + max_data = 500; > + else > + max_data = max(mtu - peer->hdrsize, 500U); > if (max_data < peer->max_data) {
[Severity: Medium] Does this change lose the 500 floor when the estimated MTU wraps in the mtu == 0 path? Earlier in rxrpc_adjust_mtu(): if (mtu == 0) { /* they didn't give us a size, estimate one */ mtu = peer->if_mtu; if (mtu > 1500) { ... } else { mtu -= 100; if (mtu < peer->hdrsize) mtu = peer->hdrsize + 4; } } If peer->if_mtu is below 100, mtu -= 100 wraps to about 0xffffffxx. The unsigned mtu < peer->hdrsize check can't catch that. Before this patch, max_t(int, mtu - peer->hdrsize, 500) read the wrapped difference as negative and gave 500. With the new code, mtu <= peer->hdrsize is false, and max(mtu - peer->hdrsize, 500U) gives roughly 0xffffff7e. That makes max_data < peer->max_data false, so the reduction is skipped. So are the pmtud_good/pmtud_bad clamps and trace_rxrpc_pmtud_reduce(). There are two ways if_mtu can end up below 100. First, when peer->if_mtu == 65535, an ICMP FRAG_NEEDED or ICMPv6 PTB with 0 < mtu < 100 sets if_mtu to that value at the top of rxrpc_adjust_mtu(). If max_data was already 500 or less at that point (for example after an ACK trailer advertised maxMTU 500), pmtud_good and pmtud_bad are not clamped. rxrpc_input_probe_for_pmtud() can then raise max_data above 500 again. Second, rxrpc_assess_MTU_size() does: peer->if_mtu = dst_mtu(dst); peer->hdrsize += dst->header_len + dst->trailer_len; A small route MTU or xfrm overhead can leave if_mtu below hdrsize, with max_data = RXRPC_JUMBO(1). In either state, a later zero-MTU ICMP that reaches the function via rxrpc_encap_err_rcv()->rxrpc_input_error()->rxrpc_adjust_mtu(peer, 0) used to cut max_data to 500. Now it has no effect. The commit message says "keep the 500 floor for MTUs at or below the header size". Does that still hold when the estimate goes below zero? Would guarding the subtraction keep the intended floor? Something like: if (mtu < peer->hdrsize + 100) mtu = peer->hdrsize + 4; else mtu -= 100;
-- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40stellman-greene.com