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>] [day] [month] [year] [list]
Date:   Mon, 24 Apr 2017 10:40:12 +0530
From:   prasad padiyar <prasad.padiyar@...il.com>
To:     netdev@...r.kernel.org
Subject: Regarding patch: vlan: avoid a synchronize_net when parent device
 goes down

Hi,

I had a query regarding the patch in the subject line.


>From the patch pasted below

             vlan = vlan_dev_priv(vlandev);
             if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING))
-                dev_change_flags(vlandev, flgs & ~IFF_UP);
+                list_add(&vlandev->close_list, &close_list);
+        }
+
+        dev_close_many(&close_list, false);
+
+        list_for_each_entry_safe(vlandev, tmp, &close_list, close_list) {
             netif_stacked_transfer_operstate(dev, vlandev);
+            list_del_init(&vlandev->close_list);
         }
+        list_del(&close_list);

"

             if (!(vlan->flags & VLAN_FLAG_LOOSE_BINDING))
-                dev_change_flags(vlandev, flgs & ~IFF_UP);
+                list_add(&vlandev->close_list, &close_list);
+        }
+
+        dev_close_many(&close_list, false);
+
+        list_for_each_entry_safe(vlandev, tmp, &close_list, close_list) {
             netif_stacked_transfer_operstate(dev, vlandev);
+            list_del_init(&vlandev->close_list);
         }
+        list_del(&close_list);.


i can see that dev_change_flags which was setting the vlan device to
down state in case VLAN_FLAG_LOOSE_BINDING was not enabled.
But setting the operstate when the VLAN real device goes admin down
was quite independent of VLAN_FLAG_LOOSE_BINDING.

Operstate was always getting transferred irrespective of LOOSE_BINDING flag.


But now with this patch, we see that control of transferring the
operstate is based of VLAN_FLAG_LOOSE_BINDING. If
VLAN_FLAG_LOOSE_BINDING is set then oper state is not changed as per
its real iface.


Is this the expected behavior. Does VLAN_FLAG_LOOSE_BINDING with this
patch has to control the operstate as well which was not
the case earlier without this patch. ?

Can someone share your views about this.

Kernel version: 4.4.20

patch link:
https://patchwork.ozlabs.org/patch/447837/

-- 
Regards,
Prasad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ