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:	Wed, 22 Oct 2014 09:58:43 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Edward Cree <ecree@...arflare.com>
Cc:	Robert Stonehouse <rstonehouse@...arflare.com>,
	Daniel Borkmann <dborkman@...hat.com>, davem@...emloft.net,
	nikolay@...hat.com, netdev@...r.kernel.org,
	Shradha Shah <sshah@...arflare.com>,
	Jon Cooper <jcooper@...arflare.com>,
	linux-net-drivers <linux-net-drivers@...arflare.com>
Subject: Re: [PATCH net-next] sfc: add support for skb->xmit_more

On Fri, 2014-10-17 at 15:32 +0100, Edward Cree wrote:
[...]
> @@ -351,7 +343,7 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb)
>  	unsigned short dma_flags;
>  	int i = 0;
>  
> -	EFX_BUG_ON_PARANOID(tx_queue->write_count != tx_queue->insert_count);
> +	EFX_BUG_ON_PARANOID(tx_queue->write_count > tx_queue->insert_count);
[...]

Doesn't this break after 2^32 descriptors?  It seems like you would need
a similar comparison to time_after(); possibly:

	EFX_BUG_ON_PARANOID((int)(tx_queue->write_count - tx_queue->insert_count) > 0);

Ben.

-- 
Ben Hutchings
For every action, there is an equal and opposite criticism. - Harrison

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ