aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-12-19compat: ipv6_dst_lookup_flow was backported to 5.3 and 5.4Jason A. Donenfeld1-1/+1
2019-12-12compat: support building for RHEL-8.1 instead of RHEL-8.0Sergey Ivanov1-2/+2
RedHat backported to their kernel 4.18.0-147.el8 a couple features. This patch enables compiling for this kernel. Signed-off-by: Sergey Ivanov <seriv@cs.umd.edu>
2019-12-12socket: convert to ipv6_dst_lookup_flow for 5.5Jason A. Donenfeld1-0/+4
Upstream changed the API, so we introduce this super insane compat hack to make everything work again.
2019-12-05netlink: prepare for removal of genl_family_attrbuf in 5.5Jason A. Donenfeld1-0/+18
2019-09-13compat: support rhel/centos 7.7Jason A. Donenfeld1-1/+1
2019-09-13compat: don't rewrite siphash when it's from compatJason A. Donenfeld1-0/+2
2019-09-11compat: support newer PaXJason A. Donenfeld1-0/+1
Reported-by: PaX Team <pageexec@freemail.hu>
2019-09-05compat: work around ubuntu breakageJason A. Donenfeld1-0/+9
They forgot to backport hsiphash.
2019-08-25compat: account for android-4.9 backport of addr_gen_modeNathan Chancellor1-4/+0
Android kernels backported d35a00b8e33dab7385f724e713ae71c8be0a49f4, so now we need to do feature detection. Link: https://android-review.googlesource.com/c/kernel/common/+/1103831 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2019-07-19compat: support running in OpenVZ environmentsJason A. Donenfeld1-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>
2019-07-04compat: define conversion constants for ancient kernelsJason A. Donenfeld1-1/+1
2019-06-28compat: support RHEL8's skb_mark_not_on_list backportJason A. Donenfeld1-1/+3
2019-06-25compat: rhel backported list modificationsJason A. Donenfeld1-1/+1
2019-06-25global: switch to coarse ktimeJason A. Donenfeld1-16/+24
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>
2019-06-24compat: unify custom function prefix/suffixJason A. Donenfeld1-31/+31
2019-06-24compat: some kernels weirdly backport prandom_u32_maxJason A. Donenfeld1-2/+3
2019-05-31compat: don't call xgetbv on cpus with no XSAVEJason A. Donenfeld1-1/+1
2019-05-29zinc: arm64: use cpu_get_elf_hwcap accessor for 5.2Jason A. Donenfeld1-0/+4
2019-05-29netlink: use new strict length types in policy for 5.2Jason A. Donenfeld1-0/+8
Reported-by: Bruno Wolff III <bruno@wolff.to>
2019-05-29socket: set ignore_df=1 on xmitJoe Holden1-0/+3
This allows the kernel to generate ipv6 fragments. Apply the same to ipv4 for consistency. Signed-off-by: Joe Holden <jwh@zorins.us>
2019-03-29compat: backport skb_mark_not_on_listJason A. Donenfeld1-0/+7
2019-03-17global: the _bh variety of rcu helpers have been unifiedJason A. Donenfeld1-0/+33
2019-03-14compat: nf_nat_core.h was removed upstreamBruno Wolff III1-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>
2019-02-27queueing: net-next has changed signature of skb_probe_transport_headerJason A. Donenfeld1-0/+5
2019-02-17compat: backport ALIGN_DOWNJason A. Donenfeld1-0/+7
2019-02-17compat: ipv6_stub is sometimes nullJason A. Donenfeld1-1/+1
On ancient kernels, ipv6_stub is sometimes null in cases where IPv6 has been disabled with a command line flag or other failures. Reported-by: Anatoli <me@anatoli.ws>
2019-01-23netlink: use __kernel_timespec for handshake timeJason A. Donenfeld1-1/+15
2019-01-23ratelimiter: totalram_pages is now a functionJason A. Donenfeld1-0/+4
Reported-by: Alex Xu <alex@alxu.ca>
2019-01-23noise: replace getnstimeofday64 with ktime_get_real_ts64Jason A. Donenfeld1-1/+1
The former was just a wrapper around the latter, and so upstream is now removing it. Also adjust the compat kludge to deal with this. Reported-by: Alex Xu <alex@alxu.ca>
2019-01-07global: update copyrightJason A. Donenfeld1-1/+1
2018-12-12compat: account for Clang CFIJason A. Donenfeld1-1/+1
2018-12-07compat: don't undef BUILD_BUG_ON for Clang >=8Nathan Chancellor1-1/+1
This has been fixed upstream. To keep this hack working for toolchains that don't have it, use CONFIG_CLANG_VERSION, which was added in commit 469cb7376c06 ("kconfig: add CC_IS_CLANG and CLANG_VERSION"), introduced in 4.18. I have added the '!defined(CONFIG_CLANG_VERSION)' to keep the hack around for Android. Most custom kernel developers are using AOSP's Clang, which currently does not have the fix and might not for a while (although it is probably on Google's mind given that it has been an issue for ChromeOS on 4.19: https://crbug.com/897215). I have verified this change against my Pixel 2 kernel and 4.20-rc3 with the latest ToT Clang. Link: https://github.com/ClangBuiltLinux/linux/issues/7 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2018-11-05compat: csum_levels is new in 3.18 but backported to RHELJason A. Donenfeld1-0/+1
2018-10-08global: rename struct wireguard_ to struct wg_Jason A. Donenfeld1-1/+1
This required a bit of pruning of our christmas trees. Suggested-by: Jiri Pirko <jiri@resnulli.us>
2018-10-08global: prefix functions used in callbacks with wg_Jason A. Donenfeld1-15/+21
Suggested-by: Jiri Pirko <jiri@resnulli.us>
2018-10-07compat: clang cannot handle __builtin_constant_pJason A. Donenfeld1-0/+7
Or, put differently, we don't want to go chasing down random versions of clang used by XDA users, so we just disable this checking on clang all together.
2018-10-07compat: make asm/simd.h conditional on its existenceJason A. Donenfeld1-18/+0
Android kernels backported it, complicating things.
2018-10-06allowedips: remove ifdefs in favor of IS_ENABLEDJason A. Donenfeld1-0/+4
2018-10-02simd: refactor simd availability handlingJason A. Donenfeld1-0/+18
2018-10-02blake2s: rename arch function and use slicker le32 helperJason A. Donenfeld1-0/+7
2018-10-02compat: kernels < 3.17 don't have read_cpuid_partNathan Chancellor1-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>
2018-09-20global: put SPDX identifier on its own lineJason A. Donenfeld1-2/+2
The kernel has very specific rules correlating file type with comment type, and also SPDX identifiers can't be merged with other comments.
2018-09-20chacha20: prefer crypto_xor_cpy to avoid memmoveJason A. Donenfeld1-0/+28
Suggested-by: Eric Biggers <ebiggers@kernel.org>
2018-09-19blake2s: simplify final functionJason A. Donenfeld1-0/+10
Suggested-by: Eric Biggers <ebiggers@kernel.org>
2018-08-28compat: rng_is_initialized made it into 4.19Jason A. Donenfeld1-53/+53
2018-08-04compat: better atomic acquire/release backportJason A. Donenfeld1-16/+10
2018-08-03peer: ensure destruction doesn't raceJason A. Donenfeld1-0/+3
Completely rework peer removal to ensure peers don't jump between contexts and create races.
2018-08-02queueing: ensure strictly ordered loads and storesJason A. Donenfeld1-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>
2018-07-18recieve: disable NAPI busy pollingThomas Gschwantner1-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>
2018-07-08receive: use NAPI on the receive pathJonathan Neuschäfer1-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>