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] [day] [month] [year] [list]
Message-ID: <CA+6hz4q5N81Fp7rUqVRdzSBX--0OLVZ5QfF3uys0CKGeySe6wA@mail.gmail.com>
Date:   Fri, 10 Mar 2017 12:11:03 +0800
From:   Feng Gao <gfree.wind@...il.com>
To:     David Ahern <dsa@...ulusnetworks.com>
Cc:     "David S. Miller" <davem@...emloft.net>, kuznet@....inr.ac.ru,
        jmorris@...ei.org, Patrick McHardy <kaber@...sh.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net-next 1/2] net: Avoid unnessary loop when master_idx
 is invalid in inet_select_addr

Hi David,

On Fri, Mar 10, 2017 at 11:58 AM, David Ahern <dsa@...ulusnetworks.com> wrote:
> 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.

Thanks. I didn't consider about the case that dev is enslaved to an l3
device you pointed.

Regards
Feng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ