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] [day] [month] [year] [list]
Date:	Thu, 08 Jul 2010 23:34:14 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jon.mason@...r.com
Cc:	netdev@...r.kernel.org, sreenivasa.honnur@...r.com,
	ram.vepa@...r.com
Subject: Re: [PATCH 2/6 net-next-2.6] vxge: Use fifo based trans_start time

From: Jon Mason <jon.mason@...r.com>
Date: Thu, 8 Jul 2010 14:21:26 -0500

> @@ -968,8 +969,10 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
>  					VXGE_HW_FIFO_TXD_TX_CKO_UDP_EN);
>  
>  	vxge_hw_fifo_txdl_post(fifo_hw, dtr);
> +
>  #ifdef NETIF_F_LLTX
> -	dev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
> +	txq = netdev_get_tx_queue(dev, vpath_no);
> +	txq->trans_start = jiffies;
>  #endif

This comment was placed there not just for it's artistic value,
you should heed what it's saying when making changes like this.

NETIF_F_LLTX drivers cannot use the per-txq trans_start mechanism,
because doing so is racy.

The dev_watchdog() timer, which checks these ->trans_start values,
can only synchornize with the driver by the traditional means,
which is by taking the spinlock on the TX queue.  This is bypassed
by NETIF_F_LLTX drivers, so the driver can be in it's TX handler
while the watchdog timer is trying to evaluate the trans_start
state.

This is one of a many reasons why NETIF_F_LLTX is a bad idea and you
should convert your driver away from it.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ