Re: Re: [PATCH net v2] net: fec: reject oversized fragments before bounce-buffer memcpy
From: Andrew Lunn
Date: Wed Oct 07 2026 - 09:44:30 EST
On Wed, Oct 07, 2026 at 05:17:20AM -0700, Aldo Ariel wrote:
> Hi Andrew, Wei, Shenwei,
>
> Thank you for the review. Shenwei confirmed that bounce buffers are
> only available on i.MX28 and cannot coexist with jumbo frames. That
> means the overflow path I described (jumbo fragments exceeding
> FEC_ENET_TX_FRSIZE) is not reachable in practice: on i.MX28 the
> max_mtu stays below the bounce buffer capacity.
>
> Given that, should I respin as a defense-in-depth guard (with the
> goto label fixed per Wei's note), or would you prefer I withdraw the
> patch?
I suggest adding a comment somewhere to explain that jumbo frames and
bounce buffers are mutually exclusive by hardware design.
We don't use defensive code, because that suggests we don't actually
understand the code!
Andrew