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-next>] [day] [month] [year] [list]
Message-Id: <20190611161031.12898-1-mcroce@redhat.com>
Date:   Tue, 11 Jun 2019 18:10:28 +0200
From:   Matteo Croce <mcroce@...hat.com>
To:     netdev@...r.kernel.org
Cc:     Stephen Hemminger <stephen@...workplumber.org>,
        David Ahern <dsahern@...nel.org>
Subject: [PATCH iproute2 v2 0/3] refactor the cmd_exec()

Refactor the netns and ipvrf code so less steps are needed to exec commands
in a netns or a VRF context.
Also remove some code which became dead. bloat-o-meter output:

$ bloat-o-meter ip.old ip
add/remove: 1/4 grow/shrink: 3/4 up/down: 174/-312 (-138)
Function                                     old     new   delta
netns_add                                    971    1058     +87
cmd_exec                                     207     256     +49
on_netns_exec                                 32      60     +28
do_switch                                      -      10     +10
netns_restore                                 69      67      -2
do_ipvrf                                     811     802      -9
netns_switch                                 838     822     -16
on_netns_label                                45       -     -45
do_netns                                    1226    1180     -46
do_each_netns                                 57       -     -57
on_netns                                      60       -     -60
netns_save                                    77       -     -77
Total: Before=668234, After=668096, chg -0.02%

Matteo Croce (3):
  netns: switch netns in the child when executing commands
  ip vrf: use hook to change VRF in the child
  netns: make netns_{save,restore} static

 include/namespace.h |  2 --
 include/utils.h     |  6 ++---
 ip/ip.c             |  1 -
 ip/ipnetns.c        | 56 +++++++++++++++++++++++++++++++++------------
 ip/ipvrf.c          | 12 ++++++----
 lib/exec.c          |  7 +++++-
 lib/namespace.c     | 31 -------------------------
 lib/utils.c         | 27 ----------------------
 8 files changed, 58 insertions(+), 84 deletions(-)

-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ