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]
Message-ID: <CAC5umygRFn0vV9pRds45w2eXGfjZAnUn9Jg1De7khmLt0s5jCA@mail.gmail.com>
Date:	Mon, 16 May 2016 22:53:41 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	David Laight <David.Laight@...lab.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Mike Sinkovsky <msink@...monline.ru>,
	"David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH -next v2 3/4] net: w5100: increase TX timeout period

2016-05-16 18:33 GMT+09:00 David Laight <David.Laight@...lab.com>:
> From: netdev-owner@...r.kernel.org Akinobu Mita
>> Sent: 14 May 2016 06:56
>> This increases TX timeout period from one second to 5 seconds which is
>> the default value if the driver doesn't explicitly set
>> net_device->watchdog_timeo.
>>
>> The one second timeout is too short for W5100 with SPI interface mode
>> which doesn't support burst READ/WRITE processing in the SPI transfer.
>> If the packet is transmitted while RX packets are being received at a
>> very high rate, the TX transmittion work in the workqueue is delayed
>> and the watchdog timer is expired.
>
> ISTM that if RX traffic can cause a 1 second timeout to expire I can
> see no reason why it shouldn't also cause a 5 second timer to expire.
>
> I'm guessing that something needs to be done to cause the SPI
> block to discard receive frames (I guess the hardware will be discarding
> them as well) in order to allow frames to be transmitted.

You are right.  In SPI interface mode, the interrupt of W5100 is masked
as far as receiving packets in w5100_rx_work(). (Ideally, RECV interrupt
should only be masked as W5200 and W5500 have different interrupt mask
bits for RECV and SENDOK, but W5100 doesn't have)

So this problem should be fixed by limiting the maximum execution time
of w5100_rx_skb() in w5100_rx_work() by maximum loop count or querying
jiffies.  I'll try it out.

> Given the 'damp string' nature of SPI, you might even want to give
> transmits priority over receives.

How can we do this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ