Skip to content

IPVS fixes for nf

Julian Anastasov lvs-devel netfilter-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 0 repliesNew
  2. v28 patches 1 replySuperseded
  3. v17 patches 1 replySuperseded

Changes in v3 from the cover letter

* Apply to recent nf tree. Changing the conn limit of 2^31 is still a work to do for boxes with 640GB+ memory (ipvs conn size is ~300 bytes on 64-bit)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ipvs: fixes for the new ip_vs_status infonet/netfilter/ipvs/ip_vs_ctl.c+36 -150 replies
2/8ipvs: fix races around the conn_lfactor and svc_lfactor sysctl varsnet/netfilter/ipvs/ip_vs_conn.c net/netfilter/ipvs/ip_vs_ctl.c+10 -40 replies
3/8ipvs: fix the spin_lock usage for RT buildnet/netfilter/ipvs/ip_vs_conn.c+41 -330 replies
4/8ipvs: do not leak dest after get from dest trashnet/netfilter/ipvs/ip_vs_ctl.c+24 -130 replies
5/8ipvs: fix races around est_mutex and est_cpulistinclude/net/ip_vs.h net/netfilter/ipvs/ip_vs_ctl.c net/netfilter/ipvs/ip_vs_est.c+100 -450 replies
6/8ipvs: fix shift-out-of-bounds in ip_vs_rht_desired_sizenet/netfilter/ipvs/ip_vs_core.c+1 -10 replies
7/8ipvs: Guard access of HK_TYPE_KTHREAD cpumask with RCUinclude/net/ip_vs.h net/netfilter/ipvs/ip_vs_ctl.c+24 -90 replies
8/8sched/isolation: Make HK_TYPE_KTHREAD an alias of HK_TYPE_DOMAINinclude/linux/sched/isolation.h+5 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCHv3 nf 0/8] IPVS fixes for nf

Hello,

This patchset contains accumulated fixes for the nf tree:

1-3) Fixes for the recently added resizable hash tables (v5)

4) dest from trash can be leaked if ip_vs_start_estimator() fails

5) fixed races and locking for the estimation kthreads (v5)

6) fix for wrong roundup_pow_of_two() usage in the resizable hash tables

7-8) v2 of the changes from Waiman Long to properly guard against
the housekeeping_cpumask() updates:

https://lore.kernel.org/netfilter-devel/[email protected]/

I added missing Fixes tag. The original description:

Since commit 041ee6f3727a ("kthread: Rely on HK_TYPE_DOMAIN for preferred affinity management"), the HK_TYPE_KTHREAD housekeeping cpumask may no longer be correct in showing the actual CPU affinity of kthreads that have no predefined CPU affinity. As the ipvs networking code is still using HK_TYPE_KTHREAD, we need to make HK_TYPE_KTHREAD reflect the reality.

This patch series makes HK_TYPE_KTHREAD an alias of HK_TYPE_DOMAIN and uses RCU to protect access to the HK_TYPE_KTHREAD housekeeping cpumask.

v3:
* Apply to recent nf tree. Changing the conn limit of 2^31 is still a work to do for boxes with 640GB+ memory (ipvs conn size is ~300 bytes on 64-bit)

v2:
* Reports: https://sashiko.dev/#/patchset/20260428175725.72050-1-ja%40ssi.bg
* introduce new patch at position 4 (dest leak)
* patch 6: check for n > 0 before roundup_pow_of_two
* patch 7 and 8 are now in reverse order to help bisection

Julian Anastasov (6):
ipvs: fixes for the new ip_vs_status info
ipvs: fix races around the conn_lfactor and svc_lfactor sysctl vars
ipvs: fix the spin_lock usage for RT build
ipvs: do not leak dest after get from dest trash
ipvs: fix races around est_mutex and est_cpulist
ipvs: fix shift-out-of-bounds in ip_vs_rht_desired_size

Waiman Long (2):
ipvs: Guard access of HK_TYPE_KTHREAD cpumask with RCU sched/isolation: Make HK_TYPE_KTHREAD an alias of HK_TYPE_DOMAIN

 include/linux/sched/isolation.h |   6 +-
 include/net/ip_vs.h             |  31 +++++-
 net/netfilter/ipvs/ip_vs_conn.c |  76 ++++++++-------
 net/netfilter/ipvs/ip_vs_core.c |   2 +-
 net/netfilter/ipvs/ip_vs_ctl.c  | 164 +++++++++++++++++++++++---------
 net/netfilter/ipvs/ip_vs_est.c  |  83 +++++++++-------
 6 files changed, 241 insertions(+), 121 deletions(-)
Signature · 1 line
2.53.0