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, 20 Jun 2007 18:57:43 +1000
From:	David Gundersen <gundy@...et.net.au>
To:	netdev@...r.kernel.org
CC:	Francois Romieu <romieu@...zoreil.com>,
	Benjamin LaHaise <bcrl@...ck.org>
Subject: Re: r8169 tx problem (1s pause with ping)


> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
> index 8f3e0da..8c0851f 100644
> --- a/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c
> @@ -2682,6 +2688,8 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
>  		    (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
>  			netif_wake_queue(dev);
>  		}
> +		if (tp->dirty_tx != tp->cur_rx)
> +			RTL_W8(TxPoll, NPQ);
>  	}
>  }
>  

Hi Francois,

A few things:

- Why are you checking dirty_tx against cur_rx (shouldn't it be cur_tx?)?

- Is there a possibility that the driver could be triggering the card to 
send invalid packets with that code?

I'm thinking in _start_xmit, the cur_tx pointer (assuming that's what 
you meant to include above) gets incremented when the packet is sent to 
the card (the RTL_W8(TxPoll,NPQ)) to indicate that the card _should_ be 
able to process packets up to that point in the queue.

The interrupt routine comes along later to clean up the buffers between 
dirty_tx (the last packet that the driver knows the card has sent) and 
cur_tx (the point that the card could potentially be up to).   What 
seems could happen with the code above is that the card gets told that a 
packet is ready to be sent when really it's not.  I'm not sure how it 
would deal with such a situation.

Regards,
Dave.
-
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