[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260105165854.104e6c1d@kernel.org>
Date: Mon, 5 Jan 2026 16:58:54 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Yeounsu Moon <yyyynoom@...il.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: dlink: mask rx_coalesce/rx_timeout before
writing RxDMAIntCtrl
On Sat, 3 Jan 2026 18:29:05 +0900 Yeounsu Moon wrote:
> RxDMAIntCtrl encodes rx_coalesce in the low 16 bits
> and rx_timeout in the high 16 bits. If either value exceeds
> the field width, the current code may truncate the value and/or
> corrupt adjacent bits when programming the register.
>
> Mask both values to 16 bits so only the intended fields are written.
Realistically IDK if this is worth it.
Paolo suggested in discussion on v1 that error checking could introduce
a regression. If we take that concern seriously we can't change the
(buggy) behavior at all.
That said the overflow is on frames, for values > 64k and the ring is
256 so IDK how high values could possibly work here in the first place.
Given this driver is using module params to configure coalescing I'd
just leave this mess be. If you add ethtool configuration for
coalescing make sure to correctly bound-check it.
--
pw-bot: reject
Powered by blists - more mailing lists