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: <20081211142900.GA10558@hmsendeavour.rdu.redhat.com>
Date:	Thu, 11 Dec 2008 09:29:00 -0500
From:	Neil Horman <nhorman@...driver.com>
To:	Jarek Poplawski <jarkao2@...il.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH] netpoll: fix race on poll_list resulting in garbage entry

On Thu, Dec 11, 2008 at 01:07:28PM +0000, Jarek Poplawski wrote:
> On 09-12-2008 22:06, Neil Horman wrote:
> ...
> > When executing napi->poll from the netpoll_path, this bit will
> > be set. When a driver calls netif_rx_complete, if that bit is set, it will not
> > remove the napi_struct from the poll_list.  That work will be saved for the next
> > iteration of net_rx_action.
> 
> This could be not enough: some drivers, e.g. sky2, call napi_complete()
> directly.
> 
I agree, some drivers might circumvent this, but I would argue that the bug in
those cases is that the driver isn't using the right api entry point, and its
the driver that needs fixing in those cases.

I chose netif_rx_complete to make that test intentionally.  Since napi_complete
gets called with local irqs disabled, I wanted the napi path to avoid doing
that, so as to block the net_rx_action fast path for as small a time as
possible.

I think the number of drivers that circumvents the netif_rx_action call is both
small and (I think) not always needed.  They can probably be migrated to use
netif_rx_complete very easily.  I'll take a look into doing that.

Neil

> Regards,
> Jarek P.
> 

-- 
/***************************************************
 *Neil Horman
 *nhorman@...driver.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/
--
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