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:	Sat, 14 Jul 2007 18:51:44 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	kaber@...sh.net
Cc:	netdev@...r.kernel.org, greearb@...delatech.com
Subject: Re: [NET 01/05]: Add net_device change_rx_mode callback

From: Patrick McHardy <kaber@...sh.net>
Date: Thu, 12 Jul 2007 20:13:40 +0200 (MEST)

> [NET]: Add net_device change_rx_mode callback
> 
> Currently the set_multicast_list (and set_rx_mode) callbacks are
> responsible for configuring the device according to the IFF_PROMISC,
> IFF_MULTICAST and IFF_ALLMULTI flags and the mc_list (and uc_list in
> case of set_rx_mode).
> 
> These callbacks can be invoked from BH context without the rtnl_mutex
> by dev_mc_add/dev_mc_delete, which makes reading the device flags and
> promiscous/allmulti count racy. For real hardware drivers that just
> commit all changes to the hardware this is not a real problem since
> the stack guarantees to call them for every change, so at least the
> final call will not race and commit the correct configuration to the
> hardware.
> 
> For software devices that want to synchronize promiscous and multicast
> state to an underlying device however this can cause corruption of the
> underlying device's flags or promisc/allmulti counts.
> 
> When the software device is concurrently put in promiscous or allmulti
> mode while set_multicast_list is invoked from bottem half context, the
> device might synchronize the change to the underlying device without
> holding the rtnl_mutex, which races with concurrent changes to the
> underlying device.
> 
> Add a dev->change_rx_flags hook that is invoked when any of the flags
> that affect rx filtering change (under the rtnl_mutex), which allows
> drivers to perform synchronization immediately and only synchronize
> the address lists in set_multicast_list/set_rx_mode.
> 
> Signed-off-by: Patrick McHardy <kaber@...sh.net>

Applied, thanks Patrick.
-
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