aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.gitignore (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-06-21mpmc_ptr_ring: add {,un}likely() annotationsThomas Gschwantner1-3/+3
2018-06-20mpmc_ptr_ring: use atomic_try_cmpxchg()Thomas Gschwantner3-12/+37
2018-06-17mpmc_ptr_ring: Fix a wordJonathan Neuschäfer1-1/+1
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-06-14selftest/mpmc_ring: Add more __init/__initdata annotationsJonathan Neuschäfer1-3/+3
The main function, mpmc_ring_selftest, is already marked with __init, but the callback functions and the ring pointer were not.
2018-06-12selftest/mpmc_ring: Remove const qualifier from mpmc_ptr_ring_produce argumentJonathan Neuschäfer1-1/+1
mpmc_ptr_ring_produce takes a void*. This fixes the following warning: net/wireguard/selftest/mpmc_ring.h: In function ‘producer_function’: net/wireguard/selftest/mpmc_ring.h:43:38: warning: passing argument 2 of ‘mpmc_ptr_ring_produce’ disc] while (mpmc_ptr_ring_produce(ring, (const void *) count)) ^
2018-06-12mpmc_ptr_ring: Include all necessary headersJonathan Neuschäfer1-0/+11
mpmc_ptr_ring.h should include the headers that it needs explicitly. This commit adds the following: - <asm/barrier.h>: smp_rmb, smp_wmb, smp_mb__before_atomic - <linux/atomic.h>: atomic_t, atomic_read, atomic_set, atomic_cmpxchg, atomic_inc - <linux/cache.h>: ____cacheline_aligned_in_smp - <linux/compiler.h>: READ_ONCE, WRITE_ONCE - <linux/errno.h>: ENOMEM - <linux/log2.h>: is_power_of_2 - <linux/processor.h>: cpu_relax - <linux/slab.h>: kcalloc, kfree - <linux/stddef.h>: NULL I'm not sure if all of them are really needed because I wasn't about to provoke a compile error due to the missing includes. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-06-12mpmc_ptr_ring: Fix some style detailsJonathan Neuschäfer2-1/+2
2018-06-11mpmc_ptr_ring: add selftestThomas Gschwantner4-1/+125
2018-06-10mpmc_ptr_ring: calculate mask once and store itThomas Gschwantner1-3/+5
2018-06-10mpmc_ptr_ring: use unsigned int instead of size_tThomas Gschwantner1-10/+10
For producers/consumers we use atomic_t which is really int, so size_t could either be too large, wasting memory, or too small (unlikely). For size, we also want to be using unsigned int, since the mask that we derive from it is ANDed with producer/consumer.
2018-06-10mpmc_ptr_ring: add include guardThomas Gschwantner1-0/+6
2018-06-08mpmc_ptr_ring: Switch to smp_[rw]mb()Jonathan Neuschäfer1-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>
2018-06-04messages: Ensure that there are more queue slots than CPUsJonathan Neuschäfer2-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.
2018-06-04mpmc_ptr_ring: Place producer_head and producer_tail in the same cachelineJonathan Neuschäfer1-5/+3
They are updated together, so it doesn't make much sense to keep them separate in the cache.
2018-06-04mpmc_ptr_ring: Use atomic_t instead of atomic_long_tJonathan Neuschäfer1-20/+20
The index range doesn't get large enough to warrant 64-bit indices.
2018-06-04mpmc_ptr_ring: Eliminate false sharing in struct mpmc_ptr_ringJonathan Neuschäfer1-3/+3
2018-06-04mpmc_ptr_ring: Reduce the memory barrier usageJonathan Neuschäfer1-26/+22
2018-06-04mpmc_ptr_ring: Fix the remaining crashJonathan Neuschäfer1-2/+2
2018-06-04[WIP] Implement a lock-free MPMC ring bufferJonathan Neuschäfer6-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
2018-06-04wg-quick: android: change name of intentJason A. Donenfeld1-1/+1
2018-06-02chacha20: add missing include to headerJason A. Donenfeld1-0/+1
2018-05-31wg-quick: android: delay setting users until endJason A. Donenfeld1-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.
2018-05-31version: bump snapshot0.0.20180531Jason A. Donenfeld2-2/+2
2018-05-31qemu: bump default versionJason A. Donenfeld1-1/+1
2018-05-31tools: constanter time encodingJason A. Donenfeld2-22/+28
2018-05-31device: do not assume dst is always validJason A. Donenfeld1-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.
2018-05-31poly1305: mips: compute S on flyRené van Dorst1-31/+22
This reduces memory access and the total opaque size. Signed-off-by: René van Dorst <opensource@vdorst.com>
2018-05-31chacha20poly1305: test for authtag failureJason A. Donenfeld1-3/+21
2018-05-31chacha20poly1305: test scattergather functions tooJason A. Donenfeld1-2/+44
2018-05-31crypto: consistent constificationJason A. Donenfeld6-23/+23
2018-05-31wg-quick: darwin: set DNS servers after delay on route changeJason A. Donenfeld1-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.
2018-05-31chacha20poly1305: combine stack variables into unionJason A. Donenfeld2-62/+64
2018-05-31chacha20poly1305: split up into separate filesJason A. Donenfeld10-627/+740
2018-05-29curve25519: x86_64: make symbol staticJason A. Donenfeld1-2/+2
2018-05-29curve25519: x86_64: satisfy sparseJason A. Donenfeld1-260/+260
2018-05-27wg-quick: freebsd: configure as p2p linkJason A. Donenfeld1-3/+5
2018-05-27wg-quick: darwin: add multiple IP addressesJason A. Donenfeld1-2/+2
2018-05-27wg-quick: determine IPs when saving interfaceJason A. Donenfeld3-12/+14
2018-05-24compat: don't clash with get_random_u32 backportsJason A. Donenfeld1-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.
2018-05-24version: bump snapshot0.0.20180524Jason A. Donenfeld2-2/+2
2018-05-24wg-quick: freebsd: work around security vulnerabilities in bashJason A. Donenfeld1-7/+29
2018-05-23wg-quick: allow enumeration of socket filesJason A. Donenfeld2-2/+2
These OSes have an unpriv'd ifconfig, so this isn't an even larger info leak.
2018-05-23wg-quick: better bash completion for non-renaming OSesJason A. Donenfeld1-5/+14
2018-05-23wg-quick: support FreeBSD/Darwin search pathJason A. Donenfeld4-16/+39
2018-05-23tools: always pass -v as first argument to installJason A. Donenfeld1-7/+7
This lets crippled OSes sed out our -v more easily.