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: <1441248121.8932.217.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 02 Sep 2015 19:42:01 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Atsushi Nemoto <nemoto@...hiba-tops.co.jp>
Cc:	davem@...emloft.net, vbridger@...nsource.altera.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH] net: eth: altera: fix napi poll_list corruption

On Thu, 2015-09-03 at 09:52 +0900, Atsushi Nemoto wrote:
> On Wed, 2 Sep 2015 11:25:00 -0700, David Miller <davem@...emloft.net> wrote:
> > Two lines below this change you are disabling interrupts anyways,
> > so I would suggest just moving the spin_lock_irqsave() before the
> > napi_gro_flush() to fix this.
> > 
> > Many of the checks done by napi_complete_done() (invoked by
> > napi_complete()) are completely redundant in this context.  For
> > example, the direct __napi_complete() call is a really nice
> > optimization because we know we are on the poll list and therefore
> > it is not empty.
> 
> Thank you for your suggestion.
> 
> I think napi_gro_flush() can be called with irq enabled, so moving the
> spin_lock_irqsave() just before the __napi_complete() (or moving the
> __napi_complete() just after the spin_lock_irqsave()) would be better,
> right?

Unless masking irqs are damn slow on hosts supporting this NIC,
I would rather use napi_complete_done() and add the possibility of
aggregating more frames per GRO packet, setting a non zero
gro_flush_timeout

Calling napi_gro_flush() and __napi_complete() looks error prone.




--
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