aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* mpmc_ptr_ring: Switch to smp_[rw]mb()Jonathan Neuschäfer2018-06-081-8/+8
| | | | | | | | | | | | | | From https://www.kernel.org/doc/Documentation/memory-barriers.txt: > SMP memory barriers are reduced to compiler barriers on uniprocessor > compiled systems because it is assumed that a CPU will appear to be > self-consistent, and will order overlapping accesses correctly with > respect to itself. Since we only order CPU memory accesses with the memory barriers in mpmc_ptr_ring.h, smp_[rw]mb() should be sufficient. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
* messages: Ensure that there are more queue slots than CPUsJonathan Neuschäfer2018-06-042-1/+9
| | | | | | | I'm not completely sure about this. It also doesn't fix all the errors: sometimes the test suite reports that it fails to send packets.
* mpmc_ptr_ring: Place producer_head and producer_tail in the same cachelineJonathan Neuschäfer2018-06-041-5/+3
| | | | | They are updated together, so it doesn't make much sense to keep them separate in the cache.
* mpmc_ptr_ring: Use atomic_t instead of atomic_long_tJonathan Neuschäfer2018-06-041-20/+20
| | | | The index range doesn't get large enough to warrant 64-bit indices.
* mpmc_ptr_ring: Eliminate false sharing in struct mpmc_ptr_ringJonathan Neuschäfer2018-06-041-3/+3
|
* mpmc_ptr_ring: Reduce the memory barrier usageJonathan Neuschäfer2018-06-041-26/+22
|
* mpmc_ptr_ring: Fix the remaining crashJonathan Neuschäfer2018-06-041-2/+2
|
* [WIP] Implement a lock-free MPMC ring bufferJonathan Neuschäfer2018-06-046-17/+225
| | | | | | | | TODO: actually use the right memory barriers in the right places TODO: eliminate false sharing between mpmc_ptr_ring members TODO: reconsider atomic_long_t vs. atomic_t, vs. the type of size in _init() TODO: sprinkle likely/unlikely on some branches FIXME: it still crashes
* wg-quick: android: change name of intentJason A. Donenfeld2018-06-041-1/+1
|
* chacha20: add missing include to headerJason A. Donenfeld2018-06-021-0/+1
|
* wg-quick: android: delay setting users until endJason A. Donenfeld2018-05-311-1/+6
| | | | | | | `ndc users add` eventually invokes SOCK_DESTROY on user sockets, causing them to reconnect. By delaying this until after routes are set, we ensure that the sockets reconnect using the tunnel, rather than the old route.
* version: bump snapshot0.0.20180531Jason A. Donenfeld2018-05-312-2/+2
|
* qemu: bump default versionJason A. Donenfeld2018-05-311-1/+1
|
* tools: constanter time encodingJason A. Donenfeld2018-05-312-22/+28
|
* device: do not assume dst is always validJason A. Donenfeld2018-05-311-1/+1
| | | | | | The new flow offloading feature at the moment does not set the dst. We have a patch pending to fix this upstream, but in the meantime, work around it here.
* poly1305: mips: compute S on flyRené van Dorst2018-05-311-31/+22
| | | | | | This reduces memory access and the total opaque size. Signed-off-by: René van Dorst <opensource@vdorst.com>
* chacha20poly1305: test for authtag failureJason A. Donenfeld2018-05-311-3/+21
|
* chacha20poly1305: test scattergather functions tooJason A. Donenfeld2018-05-311-2/+44
|
* crypto: consistent constificationJason A. Donenfeld2018-05-316-23/+23
|
* wg-quick: darwin: set DNS servers after delay on route changeJason A. Donenfeld2018-05-311-2/+6
| | | | | | This works around a race condition in macOS's network daemons, while also adding one in the form of possibly calling kill -ALRM on a stale PID; unfortunately bash can't wait from a trap.
* chacha20poly1305: combine stack variables into unionJason A. Donenfeld2018-05-312-62/+64
|
* chacha20poly1305: split up into separate filesJason A. Donenfeld2018-05-3110-627/+740
|
* curve25519: x86_64: make symbol staticJason A. Donenfeld2018-05-291-2/+2
|
* curve25519: x86_64: satisfy sparseJason A. Donenfeld2018-05-291-260/+260
|
* wg-quick: freebsd: configure as p2p linkJason A. Donenfeld2018-05-271-3/+5
|
* wg-quick: darwin: add multiple IP addressesJason A. Donenfeld2018-05-271-2/+2
|
* wg-quick: determine IPs when saving interfaceJason A. Donenfeld2018-05-273-12/+14
|
* compat: don't clash with get_random_u32 backportsJason A. Donenfeld2018-05-241-3/+2
| | | | | | Our previous heuristic wasn't good enough, since CopperheadOS backported CANARY_MASK without backporting get_random_u32, as Qualcomm did, so now we just entirely rename all invocations of the function.
* version: bump snapshot0.0.20180524Jason A. Donenfeld2018-05-242-2/+2
|
* wg-quick: freebsd: work around security vulnerabilities in bashJason A. Donenfeld2018-05-241-7/+29
|
* wg-quick: allow enumeration of socket filesJason A. Donenfeld2018-05-232-2/+2
| | | | | These OSes have an unpriv'd ifconfig, so this isn't an even larger info leak.
* wg-quick: better bash completion for non-renaming OSesJason A. Donenfeld2018-05-231-5/+14
|
* wg-quick: support FreeBSD/Darwin search pathJason A. Donenfeld2018-05-234-16/+39
|
* tools: always pass -v as first argument to installJason A. Donenfeld2018-05-231-7/+7
| | | | This lets crippled OSes sed out our -v more easily.
* wg-quick: openbsd: add new implementationJason A. Donenfeld2018-05-221-0/+451
|
* wg-quick: freebsd: add new implementationJason A. Donenfeld2018-05-222-16/+434
|
* wg-quick: darwin: do not remove routes when no real interfaceJason A. Donenfeld2018-05-221-0/+1
|
* wg-quick: darwin: rename namefile environment variableJason A. Donenfeld2018-05-221-1/+1
| | | | This paves the way for an openbsd implementation.
* tools: fix OpenBSD buildFilippo Valsorda2018-05-224-2/+4
| | | | | License: MIT Signed-off-by: Filippo Valsorda <valsorda@google.com>
* compat: work around qcom 4.9 backportsJason A. Donenfeld2018-05-221-0/+3
| | | | | | | Qualcomm backported the get_random_u32 patch, even though kernel.org didn't, which is a problem. They also backported another patch in the same place which defines a new macro variable, so use this as a differentiator.
* qemu: bump default kernel for gcc 8.1Jason A. Donenfeld2018-05-221-1/+1
|
* allowedips: set pointer to null before freeingJason A. Donenfeld2018-05-221-2/+3
|
* ncat-client-server: do not always call sudo and use env bashJason A. Donenfeld2018-05-221-2/+3
|
* version: bump snapshot0.0.20180519Jason A. Donenfeld2018-05-192-2/+2
|
* timers: no need to clear keepalive in persistent keepaliveJason A. Donenfeld2018-05-191-4/+1
| | | | | | | | We do this after sending the keepalive anyway. This is something of a regression, though, since before we'd cancel and then send, but now we send and then cancel, so it introduces a potential race, but hopefully that isn't too big of a deal.
* timers: clear send_keepalive timer on sending handshake responseJason A. Donenfeld2018-05-193-6/+12
| | | | | | We reorganize this into also doing so on sending keepalives itself, which means the state machine is much more consistent, even if this was already implied.
* timers: fix up commentJason A. Donenfeld2018-05-191-2/+2
|
* timers: remove slack_timeJason A. Donenfeld2018-05-191-8/+2
| | | | | It's already done implicitly by recent kernels and it's not adding much here.
* timers: reinitialize state on initJason A. Donenfeld2018-05-181-0/+3
|
* tools: fix errno propagation and messagesJason A. Donenfeld2018-05-185-9/+8
|