aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* compat: support running in OpenVZ environmentsJason A. Donenfeld2019-07-191-0/+8
| | | | | | | | Overriding LLTX like this is pretty ugly, but at least it means we don't have to let OpenVZ infect the real source tree. Requested-by: Benedikt Braunger <b.braunger@syseleven.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* noise: immediately rekey all peers after changing device private keyJason A. Donenfeld2019-07-116-7/+47
| | | | | Reported-by: Derrick Pallas <derrick@pallas.us> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: enforce that unused bits of flags are zeroJason A. Donenfeld2019-07-082-5/+16
| | | | | Reported-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: define conversion constants for ancient kernelsJason A. Donenfeld2019-07-042-1/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2019-07-022-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* receive: queue dead packets to napi queue instead of empty rx_queueJason A. Donenfeld2019-07-022-5/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* peer: use LIST_HEAD macroJason A. Donenfeld2019-06-281-1/+1
| | | | | Suggested-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: cast struct over cb->args for type safetyJason A. Donenfeld2019-06-281-29/+34
| | | | | | | This eliminates the headache of managing cb->args[??]. Suggested-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: support RHEL8's skb_mark_not_on_list backportJason A. Donenfeld2019-06-281-1/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: rhel backported list modificationsJason A. Donenfeld2019-06-251-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: switch to coarse ktimeJason A. Donenfeld2019-06-2511-36/+43
| | | | | | | | | | | | | | Coarse ktime is broken until [1] in 5.2 and kernels without the backport, so we use fallback code there. The fallback code has also been improved significantly. It now only uses slower clocks on kernels < 3.17, at the expense of some accuracy we're not overly concerned about. [1] https://lore.kernel.org/lkml/tip-e3ff9c3678b4d80e22d2557b68726174578eaf52@git.kernel.org/ Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: unify custom function prefix/suffixJason A. Donenfeld2019-06-243-48/+48
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: some kernels weirdly backport prandom_u32_maxJason A. Donenfeld2019-06-241-2/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: show signal when failingJason A. Donenfeld2019-06-181-3/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: spacingJason A. Donenfeld2019-06-032-123/+123
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519: not all linkers support bmi2 and adxJason A. Donenfeld2019-06-023-6/+58
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2019-06-012-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: don't call xgetbv on cpus with no XSAVEJason A. Donenfeld2019-05-311-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: add ssse3 to nobsJason A. Donenfeld2019-05-311-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: do not use xgetbv for ssse3 detectionJason A. Donenfeld2019-05-311-3/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2019-05-312-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* zinc: update copyrightJason A. Donenfeld2019-05-292-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: shorten ssse3 loopSamuel Neves2019-05-291-857/+66
| | | | | | | | This (mostly) preserves the performance (as measured on Haswell and *lake) of last commit, but it drastically reduces code size. Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s,chacha: latency tweakSamuel Neves2019-05-295-618/+982
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In every odd-numbered round, instead of operating over the state x00 x01 x02 x03 x05 x06 x07 x04 x10 x11 x08 x09 x15 x12 x13 x14 we operate over the rotated state x03 x00 x01 x02 x04 x05 x06 x07 x09 x10 x11 x08 x14 x15 x12 x13 The advantage here is that this requires no changes to the 'x04 x05 x06 x07' row, which is in the critical path. This results in a noticeable latency improvement of roughly R cycles, for R diagonal rounds in the primitive. In the case of BLAKE2s, which I also moved from requiring AVX to only requiring SSSE3, we save approximately 30 cycles per compression function call on Haswell and Skylake. In other words, this is an improvement of ~0.6 cpb. This idea was pointed out to me by Shunsuke Shimizu, though it appears to have been around for longer. Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: do not check for alignment with ubsanJason A. Donenfeld2019-05-291-0/+1
| | | | | | It insta-crashes on x86. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* zinc: arm64: use cpu_get_elf_hwcap accessor for 5.2Jason A. Donenfeld2019-05-293-2/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* kbuild: account for recent upstream changesJason A. Donenfeld2019-05-292-11/+11
| | | | | | | | Apparently cdd750bfb1f76fe9be8cfb53cbe77b2e811081ab changed things, so we fall back onto this hack. Reported-by: Alex Xu <alex@alxu.ca> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* timers: add jitter on ack failure reinitiationJason A. Donenfeld2019-05-291-2/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: build iproute2 with libmnl supportJason A. Donenfeld2019-05-291-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: use new strict length types in policy for 5.2Jason A. Donenfeld2019-05-293-14/+29
| | | | | Reported-by: Bruno Wolff III <bruno@wolff.to> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: use newer iproute2 and kernelJason A. Donenfeld2019-05-291-9/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* socket: set ignore_df=1 on xmitJoe Holden2019-05-292-0/+6
| | | | | | | | This allows the kernel to generate ipv6 fragments. Apply the same to ipv4 for consistency. Signed-off-by: Joe Holden <jwh@zorins.us> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: udp_tunnel: force cast sk_data_readyJason A. Donenfeld2019-04-141-1/+3
| | | | | Reference: https://lists.zx2c4.com/pipermail/wireguard/2019-April/004081.html Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2019-04-062-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* allowedips: initialize list head when removing intermediate nodesJason A. Donenfeld2019-04-062-1/+5
| | | | | | | | | | | Otherwise if this list item is later reused, we'll crash on list poison or worse. Also, add a version of Mimka's reproducer to netns.sh to catch these types of bugs in the future. Reported-by: Mimka <mikma.wg@lists.m7n.se> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: backport skb_mark_not_on_listJason A. Donenfeld2019-03-291-0/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: remove outlen parameter from finalJason A. Donenfeld2019-03-274-12/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: simplifySamuel Neves2019-03-272-40/+12
| | | | | Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: set framewarn 1280 for 64bit and 1024 for 32bitJason A. Donenfeld2019-03-2514-4/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* device: use skb accessor functions where possibleJason A. Donenfeld2019-03-251-2/+2
| | | | | Suggested-by: David Miller <davem@davemloft.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* allowedips: do not use __always_inlineJason A. Donenfeld2019-03-251-9/+9
| | | | | | | DaveM doth forbid. Suggested-by: David Miller <davem@davemloft.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* peerlookup: rename from hashtablesJason A. Donenfeld2019-03-257-9/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: the _bh variety of rcu helpers have been unifiedJason A. Donenfeld2019-03-177-12/+57
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: nf_nat_core.h was removed upstreamBruno Wolff III2019-03-141-0/+2
| | | | | | | | In d2c5c103b133 ("netfilter: nat: remove nf_nat_l3proto.h and nf_nat_core.h"). Signed-off-by: Bruno Wolff III <bruno@wolff.to> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2019-02-272-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* queueing: net-next has changed signature of skb_probe_transport_headerJason A. Donenfeld2019-02-272-1/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* allowedips: maintain per-peer list of allowedipsJason A. Donenfeld2019-02-266-160/+129
| | | | | | | | | | This makes `wg show` and `wg showconf` and the like significantly faster, since we don't have to iterate through every node of the trie for every single peer. It also makes netlink cursor resumption much less problematic, since we're just iterating through a list, rather than having to save a traversal stack. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* peer: only synchronize_rcu_bh and traverse trie once when removing all peersJason A. Donenfeld2019-02-252-20/+42
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: don't remove allowed ips for new peersJason A. Donenfeld2019-02-251-0/+3
| | | | | | This causes needless traversal of the trie. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Makefile: make the depmod path configurableLuis Ressel2019-02-171-1/+2
| | | | | Signed-off-by: Luis Ressel <aranea@aixah.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>