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-next>] [day] [month] [year] [list]
Date:	Tue, 18 May 2010 12:29:53 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	sonic.adi@...il.com
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH 06/11] netdev: bfin_mac: avoid tx skb overflows in the
 tx DMA ring

From: Sonic Zhang <sonic.adi@...il.com>
Date: Tue, 18 May 2010 18:52:17 +0800

[ Please never drop the mailing list when you're trying to
  discuss something networking related with me, thanks.
  I've put the CC: back. ]

> On Mon, May 10, 2010 at 7:40 PM, David Miller <davem@...emloft.net> wrote:
>> From: Mike Frysinger <vapier@...too.org>
>> Date: Sun,  9 May 2010 06:18:52 -0400
>>
>>> From: Sonic Zhang <sonic.zhang@...log.com>
>>>
>>> Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
>>> Signed-off-by: Mike Frysinger <vapier@...too.org>
>>
>> This should never ever happen, it's a bug and you should print a warning
>> message when and if it does actually occur.
>>
>> At any point where your ->next pointer hits tx_list_head, the queue
>> should have been stopped by your driver and therefore the networking
>> core will never pass another packet to you.
> 
> To reduce the tx output overhead, the tx interrupt is not enabled and
> handled in this driver. So, the driver doesn't know when to restart
> the tx queue if the queue is stopped in ndo_start_xmit() at the point
> where next pointer hits tx_list_head.
> 
> In this case, although TX buffer list full rarely happens, the check
> is still a safeguard.

You can't do that, if you don't use the TX interrupt then you can leave
SKBs stale in your TX ring for indefinite periods of time which is
illegal.

SKBs hold onto resources that can't be held indefinitely, such as TCP
socket references and netfilter conntrack state.  So if you leave a
packet in your TX ring for a long time, there might be a TCP socket
that now cannot be closed and freed up because of that.

You must therefore free them very as soon as possible after the
hardware is done with them.
--
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