path: root/src/compat (follow)
Commit message (Collapse)AuthorAgeFilesLines
* simd: return a bool from simd_relaxJason A. Donenfeld2018-10-021-1/+3
| | | | Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* blake2s: rename arch function and use slicker le32 helperJason A. Donenfeld2018-10-021-0/+7
* compat: kernels < 3.17 don't have read_cpuid_partNathan Chancellor2018-10-021-0/+4
| | | | | | | | Use read_cpuid_part_number, which was the same thing before upstream commit af040ffc9ba1 ("ARM: make it easier to check the CPU part number correctly"). Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* global: put SPDX identifier on its own lineJason A. Donenfeld2018-09-205-10/+10
| | | | | The kernel has very specific rules correlating file type with comment type, and also SPDX identifiers can't be merged with other comments.
* chacha20: prefer crypto_xor_cpy to avoid memmoveJason A. Donenfeld2018-09-201-0/+28
| | | | Suggested-by: Eric Biggers <ebiggers@kernel.org>
* blake2s: simplify final functionJason A. Donenfeld2018-09-191-0/+10
| | | | Suggested-by: Eric Biggers <ebiggers@kernel.org>
* crypto: pass simd by referenceJason A. Donenfeld2018-09-171-16/+28
* simd: add __must_check annotationJason A. Donenfeld2018-09-151-2/+2
| | | | Suggested-by: Andy Lutomirski <luto@amacapital.net>
* compat: move simd.h from crypto to compat since it's going upstreamJason A. Donenfeld2018-09-062-0/+69
* compat: arch-namespace certain includesJason A. Donenfeld2018-09-065-8/+8
* compat: support neon.h on old kernelsJason A. Donenfeld2018-09-062-0/+14
| | | | Reported-by: Philipp Richter <richterphilipp.pops@gmail.com>
* compat: rng_is_initialized made it into 4.19Jason A. Donenfeld2018-08-281-53/+53
* compat: better atomic acquire/release backportJason A. Donenfeld2018-08-041-16/+10
* peer: ensure destruction doesn't raceJason A. Donenfeld2018-08-031-0/+3
| | | | | Completely rework peer removal to ensure peers don't jump between contexts and create races.
* queueing: ensure strictly ordered loads and storesJason A. Donenfeld2018-08-021-0/+28
| | | | | | | We don't want a consumer to read plaintext when it's supposed to be reading ciphertext, which means we need to synchronize across cores. Suggested-by: Jann Horn <jann@thejh.net>
* recieve: disable NAPI busy pollingThomas Gschwantner2018-07-181-0/+9
| | | | | | | | | | | | | | This avoids adding one reference per peer to the napi_hash hashtable, as normally done by netif_napi_add(). Since we potentially could have up to 2^20 peers this would make busy polling very slow globally. This approach is preferable to having only a single napi struct because we get one gro_list per peer, which means packets can be combined nicely even if we have a large number of peers. This is also done by gro_cells_init() in net/core/gro_cells.c . Signed-off-by: Thomas Gschwantner <tharre3@gmail.com>
* receive: use NAPI on the receive pathJonathan Neuschäfer2018-07-081-0/+4
| | | | | | Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> [Jason: fixed up the flushing of the rx_queue in peer_remove] Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
* compat: more robust ktime backportJason A. Donenfeld2018-06-241-3/+8
| | | | This is needed for frankenkernels, like android-common.
* global: use fast boottime instead of normal boottimeJason A. Donenfeld2018-06-231-3/+3
| | | | Generally if we're inaccurate by a few nanoseconds, it doesn't matter.
* global: use ktime boottime instead of jiffiesJason A. Donenfeld2018-06-231-9/+10
| | | | | | | | Since this is a network protocol, expirations need to be accounted for, even across system suspend. On real systems, this isn't a problem, since we're clearing all keys before suspend. But on Android, where we don't do that, this is something of a problem. So, we switch to using boottime instead of jiffies.
* global: fix a few typosJonathan Neuschäfer2018-06-221-1/+1
| | | | Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
* compat: use stabler lkml linksJason A. Donenfeld2018-06-191-2/+2
| | | | | | This will redirect to whichever archive kernel.org thinks is best. Suggested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
* receive: drop handshake packets if rng is not initializedJason A. Donenfeld2018-06-191-0/+53
| | | | Otherwise it's too easy to trigger cookie reply messages.
* 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.
* 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.
* compat: backport for OpenSUSE 15Jason A. Donenfeld2018-05-141-1/+1
* compat: don't clear header bits on RHELJason A. Donenfeld2018-05-131-1/+4
| | | | | | | | | | The 3.10 kernel from Red Hat puts head_frag in between headers_start and headers_end. This is triggered on the latest i40e driver. This results in the packet being freed incorrectly, crashing the system. So, this patch just ensures we don't zero any of the header bits. The whole issue of zeroing header bits probably should be revisited sometime somewhat soon.
* compat: handle RHEL 7.5's recent backportsJason A. Donenfeld2018-05-131-5/+5
* socket: use skb_put_dataJason A. Donenfeld2018-05-131-0/+9
* compat: remove unused dev_recursion_level backportJason A. Donenfeld2018-04-161-7/+0
* compat: support OpenSUSE 15Jason A. Donenfeld2018-03-091-3/+6
* compat: silence warning on frankenkernelsJason A. Donenfeld2018-03-091-0/+3
| | | | Some Android 3.18 devices backport this macro.
* compat: stable kernels are now receiving b87b619Jason A. Donenfeld2018-03-071-1/+1
* compat: use correct -include pathJason A. Donenfeld2018-03-021-5/+6
* global: in gnu code, use un-underscored asmJason A. Donenfeld2018-03-021-1/+1
* compat: workaround netlink refcount bugJason A. Donenfeld2018-03-021-1/+1
| | | | | | | For now it looks like only 4.16 has this, but we'll keep track in case others add it too. Upstream-fix: b87b6194be63 ("netlink: put module reference if dump start fails")
* global: year bumpJason A. Donenfeld2018-01-037-7/+7
* compat: kernels < 3.13 modified genl_opsJason A. Donenfeld2017-12-211-1/+2
* chacha20poly1305: wire up avx512vl for skylake-xJason A. Donenfeld2017-12-113-2/+82
* global: add SPDX tags to all filesGreg Kroah-Hartman2017-12-095-2/+22
| | | | | | | | | | | | | 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>
* compat: fix 3.10 backportJason A. Donenfeld2017-11-292-0/+26
| | | | | | | 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.
* compat: support RAP in assemblyJason A. Donenfeld2017-11-282-0/+17
* compat: support 4.15's netlink and barrier changesJason A. Donenfeld2017-11-261-0/+6
* compat: fix typo and rangesJason A. Donenfeld2017-11-231-1/+1
* compat: support AVX512BW+VL by lyingJason A. Donenfeld2017-11-221-2/+15
* compat: support timespec64 on old kernelsJason A. Donenfeld2017-11-221-0/+5
* chacha20poly1305: import x86_64 primitives from OpenSSLSamuel Neves2017-11-222-4/+30
| | | | | | x86_64 only at the moment. SSSE3, AVX, AVX2, AVX512. Signed-off-by: Samuel Neves <sneves@dei.uc.pt>
* compat: new kernels have netlink fixesJason A. Donenfeld2017-11-221-12/+9
* compat: stable finally backported fixJason A. Donenfeld2017-11-221-1/+1
* compat: fix compilation with PaXJason A. Donenfeld2017-11-141-0/+12
| | | | | | Despite not having access to the latest grsecurity source, I still do very much want to keep supporting it, so this patch is my best guess at what will work.