[CRIU] [PATCH v4 0/3] c/r non-dev net syctls

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Wed Jul 20 07:27:55 PDT 2016


This is a try to migrate /proc/sys/net static sysctls -
the ones on netns but not per-device, now without dinamic
sysctls detection via /proc/sys/net readdir.

I added full path(except /proc/sys/ part) to sysctl entry in protobuf
as it is easier than hardcoding these entries in code.

/proc/sys/net/netfilter/nf_log/xx sysctls are hard to set - see
patch 2/4 so skiping NONE case. Made fix for kernel it is in nf-next:
http://git.kernel.org/cgit/linux/kernel/git/pablo/nf-next.git/commit/?id=c6ac37d8d8843fb1fdc34e4a2a41a4f027ab670c

Touching igmp_link_local_mcast_reports is unsafe in v4.3-v4.5 kernels
but as it is known kernel problem one can get fix easily see patch 1/3.

v2: remove non-writable in netns sysctls from test
v3: fix igmp_link_local_mcast_reports problem, add more sysctls from
kernel v4.6 to test
v4: remove readdir, make it static list, and unfix
igmp_link_local_mcast_reports

https://jira.sw.ru/browse/PSBM-48397

Pavel Tikhomirov (3):
  net/sysctl: c/r all except *.conf.* and *.neigh.*
  zdtm: add irand_range helper and use it in netns-dev test
  zdtm/sysctls: test all net.xxx except conf and neigh

 criu/net.c                          | 293 +++++++++++++++++++++++++++++-
 images/netdev.proto                 |  14 +-
 images/sysctl.proto                 |   5 +
 test/zdtm/lib/Makefile              |   2 +-
 test/zdtm/lib/randrange.c           |  36 ++++
 test/zdtm/lib/randrange.h           |  13 ++
 test/zdtm/static/Makefile           |   1 +
 test/zdtm/static/netns-dev.c        |  46 +----
 test/zdtm/static/netns-sysctls.c    | 353 ++++++++++++++++++++++++++++++++++++
 test/zdtm/static/netns-sysctls.desc |   1 +
 10 files changed, 719 insertions(+), 45 deletions(-)
 create mode 100644 test/zdtm/lib/randrange.c
 create mode 100644 test/zdtm/lib/randrange.h
 create mode 100644 test/zdtm/static/netns-sysctls.c
 create mode 100644 test/zdtm/static/netns-sysctls.desc

-- 
2.5.5



More information about the CRIU mailing list