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:   Thu, 9 Mar 2017 20:58:46 -0700
From:   David Ahern <dsa@...ulusnetworks.com>
To:     fgao@...ai8.com, davem@...emloft.net, kuznet@....inr.ac.ru,
        jmorris@...ei.org, kaber@...sh.net, netdev@...r.kernel.org,
        gfree.wind@...il.com
Subject: Re: [PATCH v3 net-next 1/2] net: Avoid unnessary loop when master_idx
 is invalid in inet_select_addr

On 3/9/17 7:52 PM, fgao@...ai8.com wrote:
> From: Gao Feng <fgao@...ai8.com>
> 
> When master_idx is invalid, it is zero. It is unnecessary to iterate
> all netdevs. Because l3mdev_master_ifindex_rcu(dev) != master_idx must
> be true.
> Now put this loop into the condition block when master_idx is valid.

you are significantly changing how this loop works, not just the
master_idx == 0 case. Basically, if dev does not have an address, you
are not going to look at the other interfaces.

The
   if (l3mdev_master_ifindex_rcu(dev) != master_idx)

is actually relevant.

If dev is enslaved to an L3 device, only consider devices in that
domain. Conversely, if dev is NOT enslaved to an L3 device, do NOT
consider devices that are enslaved to one. Both of those are equally
important.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ