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]
Date:   Thu, 08 Feb 2018 15:34:53 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     dnelson@...hat.com
Cc:     rric@...nel.org, sgoutham@...ium.com, netdev@...r.kernel.org,
        Vadim.Lomovtsev@...ium.com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: net: thunder: change q_len's type to handle max ring size

From: Dean Nelson <dnelson@...hat.com>
Date: 

> The Cavium thunder nicvf driver supports rx/tx rings of up to 65536 entries per.
> The number of entires are stored in the q_len member of struct q_desc_mem. The
> problem is that q_len being a u16, results in 65536 becoming 0.
> 
> In getting pointers to descriptors in the rings, the driver uses q_len minus 1
> as a mask after incrementing the pointer, in order to go back to the beginning
> and not go past the end of the ring.
> 
> With the q_len set to 0 the mask is no longer correct and the driver does go
> beyond the end of the ring, causing various ills. Usually the first thing that
> shows up is a "NETDEV WATCHDOG: enP2p1s0f1 (nicvf): transmit queue 7 timed out"
> warning.
> 
> This patch remedies the problem by changing q_len to a u32.
> 
> Signed-off-by: Dean Nelson <dnelson@...hat.com>

Applied, thanks.

Another way to solve this could have been to encode that length
as "length - 1"

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ