Skip to content

wireguard fixes for 5.13-rc5

Jason A. Donenfeld netdev stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9wireguard: selftests: remove old conntrack kconfig valuetools/testing/selftests/wireguard/qemu/kernel.config+0 -10 replies
2/9wireguard: selftests: make sure rp_filter is disabled on vethctools/testing/selftests/wireguard/netns.sh+1 -00 replies
3/9wireguard: do not use -O3drivers/net/wireguard/Makefile+1 -20 replies
4/9wireguard: use synchronize_net rather than synchronize_rcudrivers/net/wireguard/peer.c drivers/net/wireguard/socket.c+4 -40 replies
5/9wireguard: peer: allocate in kmem_cachedrivers/net/wireguard/main.c drivers/net/wireguard/peer.c drivers/net/wireguard/peer.h+27 -40 replies
6/9wireguard: allowedips: initialize list head in selftestdrivers/net/wireguard/selftest/allowedips.c+2 -10 replies
7/9wireguard: allowedips: remove nodes in O(1)drivers/net/wireguard/allowedips.c drivers/net/wireguard/allowedips.h+57 -840 replies
8/9wireguard: allowedips: allocate nodes in kmem_cachedrivers/net/wireguard/allowedips.c drivers/net/wireguard/allowedips.h drivers/net/wireguard/main.c+38 -80 replies
9/9wireguard: allowedips: free empty intermediate nodes when removing single nodedrivers/net/wireguard/allowedips.c drivers/net/wireguard/allowedips.h drivers/net/wireguard/selftest/allowedips.c+137 -1310 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net 0/9] wireguard fixes for 5.13-rc5

Hi Dave/Jakub,

Here are bug fixes to WireGuard for 5.13-rc5:

1-2,6) These are small, trivial tweaks to our test harness.

3) Linus thinks -O3 is still dangerous to enable. The code gen wasn't so much different with -O2 either.

4) We were accidentally calling synchronize_rcu instead of synchronize_net while holding the rtnl_lock, resulting in some rather large stalls that hit production machines.

5) Peer allocation was wasting literally hundreds of megabytes on real world deployments, due to oddly sized large objects not fitting nicely into a kmalloc slab.

7-9) We move from an insanely expensive O(n) algorithm to a fast O(1)
algorithm, and cleanup a massive memory leak in the process, in which allowed ips churn would leave danging nodes hanging around without cleanup until the interface was removed. The O(1) algorithm eliminates packet stalls and high latency issues, in addition to bringing operations that took as much as 10 minutes down to less than a second.

Thanks,
Jason