lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e439e649-ca9a-4245-80bf-9f1749c5af3e@bootlin.com>
Date: Wed, 7 Jan 2026 09:38:56 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
 Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, linux-arm-kernel@...ts.infradead.org,
 linux-stm32@...md-mailman.stormreply.com,
 Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
 Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 2/9] net: stmmac: dwmac4: fix RX FIFO fill
 statistics



On 06/01/2026 21:31, Russell King (Oracle) wrote:
> In dwmac4_debug(), the wrong shift is used with the RXFSTS mask:
> 
>  #define MTL_DEBUG_RXFSTS_MASK          GENMASK(5, 4)
>  #define MTL_DEBUG_RXFSTS_SHIFT         4
>  #define MTL_DEBUG_RRCSTS_SHIFT         1
> 
>                        u32 rxfsts = (value & MTL_DEBUG_RXFSTS_MASK)
>                                     >> MTL_DEBUG_RRCSTS_SHIFT;
> 
> where rxfsts is tested against small integers 1 .. 3. This results in
> the tests always failing, causing the "mtl_rx_fifo__fill_level_empty"
> statistic counter to always be incremented no matter what the fill
> level actually is.
> 
> Fix this by using FIELD_GET() and remove the unnecessary
> MTL_DEBUG_RXFSTS_SHIFT definition as FIELD_GET() will shift according
> to the least siginificant set bit in the supplied field mask.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>

Reviewed-by: Maxime Chevallier <maxime.chevallier@...tlin.com>

Maxime


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ