linux/net/netfilter/ipvs
Alexander Mikhalitsyn 2b696a2a10 ipvs: allow some sysctls in non-init user namespaces
Let's make all IPVS sysctls writtable even when
network namespace is owned by non-initial user namespace.

Let's make a few sysctls to be read-only for non-privileged users:
- sync_qlen_max
- sync_sock_size
- run_estimation
- est_cpulist
- est_nice

I'm trying to be conservative with this to prevent
introducing any security issues in there. Maybe,
we can allow more sysctls to be writable, but let's
do this on-demand and when we see real use-case.

This patch is motivated by user request in the LXC
project [1]. Having this can help with running some
Kubernetes [2] or Docker Swarm [3] workloads inside the system
containers.

Link: https://github.com/lxc/lxc/issues/4278 [1]
Link: b722d017a3/pkg/proxy/ipvs/proxier.go (L103) [2]
Link: 3797618f9a/osl/namespace_linux.go (L682) [3]

Cc: Julian Anastasov <ja@ssi.bg>
Cc: Simon Horman <horms@verge.net.au>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-05-08 12:22:18 +01:00
..
ip_vs_app.c ipvs: fix WARNING in ip_vs_app_net_cleanup() 2022-11-02 09:39:14 +01:00
ip_vs_conn.c ipvs: Simplify the allocation of ip_vs_conn slab caches 2024-01-29 15:43:20 +01:00
ip_vs_core.c ip_tunnel: convert __be16 tunnel flags to bitmaps 2024-04-01 10:49:28 +01:00
ip_vs_ctl.c ipvs: allow some sysctls in non-init user namespaces 2024-05-08 12:22:18 +01:00
ip_vs_dh.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_est.c Kill sched.h dependency on rcupdate.h 2023-12-27 11:50:20 -05:00
ip_vs_fo.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_ftp.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_lblc.c netfilter: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
ip_vs_lblcr.c netfilter: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
ip_vs_lc.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_mh.c netfilter: ipvs: Use the bitmap API to allocate bitmaps 2022-07-21 00:55:39 +02:00
ip_vs_nfct.c netfilter: nf_conntrack_sip: fix expectation clash 2019-07-16 13:16:59 +02:00
ip_vs_nq.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_ovf.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_pe.c ipvs: don't ignore errors in case refcounting ip_vs module fails 2019-10-24 11:53:19 +02:00
ip_vs_pe_sip.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_proto.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ip_vs_proto_ah_esp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ip_vs_proto_sctp.c ipvs: Fix checksumming on GSO of SCTP packets 2024-04-25 00:22:48 +02:00
ip_vs_proto_tcp.c ipvs: adjust the debug info in function set_tcp_state 2020-10-20 13:54:46 +02:00
ip_vs_proto_udp.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ip_vs_rr.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_sched.c ipvs: don't ignore errors in case refcounting ip_vs module fails 2019-10-24 11:53:19 +02:00
ip_vs_sed.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_sh.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_sync.c ipv6: annotate data-races around np->mcast_oif 2023-12-11 10:59:17 +00:00
ip_vs_twos.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_wlc.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_wrr.c ipvs: add missing module descriptions 2023-11-08 13:52:33 +01:00
ip_vs_xmit.c inet: introduce dst_rtable() helper 2024-04-30 18:32:38 -07:00
Kconfig ipvs: increase ip_vs_conn_tab_bits range for 64BIT 2023-06-01 21:16:38 +02:00
Makefile ipvs: add weighted random twos choice algorithm 2021-01-26 01:09:46 +01:00