summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2018-02-12socket: free skb if there isn't an endpointJason A. Donenfeld
Because the packet transmission interface in Linux, in general, has the characteristic of "consuming" skbs, our own socket_send family too must always consume skbs. This means that when a caller passes an skb to a socket_send function, he looses ownership and expects for the skb to be freed by the socket_send function, not by himself. Therefore, it's important that we actually carry out this contract under all circumstances, even when there's no endpoint available. This condition could be hit by setting up a peer with a persistent keepalive but no endpoint, or by removing an endpoint once packets were queued up to be sent already. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-12qemu: more granular memleak detectionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-12netns: replace n0 ip with ip0, per customJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-08poly1305: fix up selftest counterJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-07qemu: add support for powerpcJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-02version: bump snapshotJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-02qemu: update base versionsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-01curve25519: break more things with more test casesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-01curve25519: replace fiat64 with faster hacl64Jason A. Donenfeld
This reverts commit da4ff396cc5d5e0ff21f9ecbc2f951c048c63fff and adds some optimizations to hacl64. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-01curve25519: replace hacl64 with fiat64Jason A. Donenfeld
For now, it's faster: hacl64: 109782 cycles per call fiat64: 108984 cycles per call It's quite possible this commit will be reverted with nice changes from INRIA, though. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-01curve25519: verify that specialized basepoint implementations are correctJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-30chacha20poly1305: better buffer alignmentJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-30chacha20poly1305: use existing rol32 functionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-30device: let udev know what kind of device we areJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-23qemu: disable AVX-512 in userlandJason A. Donenfeld
We're trying to test kernel code, so the userland tools we use for doing that testing don't really matter to us. We turn off AVX512, because WireGuard supports kernels that do not support AVX512 userlands. It's easier to just blanket-disable it all, since it doesn't matter anyway. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-23qemu: disable PIE for compilationJason A. Donenfeld
Some old kernels never backported this fix to the build system, and it's required if we want to build those old kernels with PIE-by-default compilers. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-23tools: share curve25519 implementations with kernelJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-19poly1305: add poly-specific self-testsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18curve25519-fiat32: uninline certain functionsJason A. Donenfeld
While this has a negative performance impact on x86_64, it has a positive performance impact on smaller machines, which is where we're actually using this code. For example, an A53: Before: fiat32: 228605 cycles per call After: fiat32: 188307 cycles per call Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18version: bump snapshotJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18curve25519: wire up new impls and remove donnaJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18curve25519: resolve symbol clash between fe typesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18curve25519: import 64-bit hacl-star implementationJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18curve25519: import 32-bit fiat-crypto implementationJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18curve25519: modularize implementationJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-18poly1305: remove indirect callsSamuel Neves
Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-08socket: check for null socket before fishing out sportJason A. Donenfeld
Otherwise we could have a null pointer dereference. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-03global: year bumpJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-03receive: treat packet checking as irrelevant for timersJason A. Donenfeld
Receiving any type of authenticated data is a receive and a traversal. When it isn't a keepalive it's a data. That's our rule. Whether or not it's the correct type of data or has the right IP header shouldn't influence timer decisions. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-21version: bump snapshotJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-21compat: kernels < 3.13 modified genl_opsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-13crypto: compile on UMLJason A. Donenfeld
We basically just don't use FPU in UML. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-11version: bump snapshotJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-11chacha20poly1305: wire up avx512vl for skylake-xJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-11chacha20: avx512vl implementationSamuel Neves
Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-11poly1305: fix avx512f alignment bugSamuel Neves
Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-11chacha20poly1305: cleaner generic codeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-09blake2s-x86_64: fix spacingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-09global: add SPDX tags to all filesGreg Kroah-Hartman
It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files. Update all files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Modified-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-03chacha20-arm: fix with clang -fno-integrated-as.David Benjamin
The __clang__-guarded #defines cause gas to complain if clang is passed -fno-integrated-as. Emitting .syntax unified when those are used fixes this. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-03poly1305: update x86-64 kernel to AVX512F onlySamuel Neves
Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-30kernel-tree: jury rig is the more common spellingJason A. Donenfeld
According to the Google Ngram viewer, jury is significantly more common than jerry. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-29netlink: rename symbol to avoid clashesJason A. Donenfeld
At somepoint we may need to wg_ namespace these. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-29device: clear last handshake timer on ifdownJason A. Donenfeld
Otherwise new handshakes might not occur immediately when the interface goes up and down. Also initialize peers to having a proper zeroed handshake jiffies. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-29compat: fix 3.10 backportJason A. Donenfeld
For archs that do not provide the magic csum function, we need to provide the generic function. Also, some obscure 3.10s have backported the int size macros, so we ifndef around that to avoid potentially fatal warnings. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-28device: do not clear keys during sleep on AndroidJason A. Donenfeld
This makes sense for the security model of laptops, but not for clicking phones on and off, where we actually want to be able to handle incoming packets. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-28curve25519: explictly depend on AS_AVXJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-28compat: support RAP in assemblyJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-28curve25519: modularize dispatchJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-27version: bump snapshotJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>