summaryrefslogtreecommitdiff
path: root/backport
AgeCommit message (Collapse)Author
2018-09-19header: Add u64_stats_update_{begin,end}_irqsave()Hauke Mehrtens
These functions are currently used by the usbnet driver. These functions were introduced in upstream commit 2695578b896ae ("net: usbnet: fix potential deadlock on 32bit hosts") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-19header: Add NL_SET_BAD_ATTRHauke Mehrtens
This is used by the mac80211_hwsim driver. The code was copied from the mainline kernel. This was introduced in mainline kernel commit c3ab2b4ec8f7 ("net: ipv4: Add extack messages for route add failures") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-19header: Add kvzalloc()Hauke Mehrtens
This adds the kvzalloc() function and allows it to remove the lib-rhashtable.patch patch. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> [fix commit message kzalloc -> kvzalloc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-19backports: Remove unused partsHauke Mehrtens
This removes parts which were only used by subsystems which are not included in backports any more, for example media, bluetooth and Ethernet. The patches which are removed in this commit are not applied to the kernel tree anyway with the default configuration because non of the files get copied. The freezer, media, regulator and sound parts were only used by the already removed media drivers. The flow dissector file is not copied any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backports: crypto_memneq has been backported to 3.12 and 3.10Alban Bedel
crypto_memneq has been backported in 3.12.59 and 3.10.106, it shouldn't be built for these kernels. Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backports: backport sg_init_marker()Felix Fietkau
It is used by new mt76 changes Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backport: add firmware_request_nowarn and firmware_request_cacheFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backport-include: backport ktime_get_boottime_secondsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backport-include: backport kvmalloc and kvmalloc_arrayFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-08-22backports: add header file for function memcmpWinnie Chang
Function memcmp is implicit declaration on kernel 4.9.88 ARM platform. backport-include/keys/asymmetric-type.h uses function memcmp but its caller compat/verification/verify.c and all its related header files do not include string.h. The header file is usually included from arch/arm/include/asm, but in this configuration, it doesn't. We need to be safe and insure string.h is there. Signed-off-by: Winnie Chang <winnie.chang@cypress.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-06-25backports: genl: fix family->family.id accessJohannes Berg
If compiling on 3.13, struct genl_family isn't actually struct backport_genl_family, and then family->family doesn't exist. In other cases, it's actually necessary to update it, so add an #ifdef with the same logic as the override from genl_family -> backport_genl_family. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-06-04backports: update id field in backports genl familyAaron Komisar
Family ID from the original family struct will be used when building genl messages (sent as nlmsg_type), so the new id should be updated in the original (older kernel format) family struct too Signed-off-by: Aaron Komisar <aaron.komisar@tandemg.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-05-02backport-include: deal with struct sock::sk_pacing_shiftArend Van Spriel
In kernel 4.15 the field sk_pacing_shift was introduced to allow (wifi) drivers to change the behaviour of TSQ. In 4.16 a helper function was added which mac80211 is using. So backport the helper which is just a stub for kernels prior to 4.15. Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-05-02backport-include: add ETH_P_PREAUTH definition in if_ether.hArend Van Spriel
This macro definition was added in 4.17-rc1 and used by mac80211 so add it to backport. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-04-26gitignore: add .cache.mkJohannes Berg
This seems to be generated by newer kernels when building, add it to the gitignore. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-04-26backports: rename *-asn1.[ch] to *.asn1.[ch]Winnie Chang
linux-stable 4fa8bc949de11c99ee2433c602d43f87c452f4f2 renamed *-asn1.[ch] files to *.asn1.[ch]. Make the corresponding change for backports. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21backports: Add staging rtlwifi, rtl8188eu and rtl8723bs driverHauke Mehrtens
This adds the staging Realtek drivers which are making use of cfg80211 and mac80211. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: inet_frag.h: Use old version of in sub_frag_mem_limit() for kernel 3.16Hauke Mehrtens
In Linux commit d19c3d91d1cf3 ("Revert "net: use lib/percpu_counter API for fragmentation mem accounting"") the sub_frag_mem_limit() and add_frag_mem_limit() functions were changed back to the old versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: netdevice.h: Fix netdev_upper_dev_link on 4.14Hauke Mehrtens
Commit 42ab19ee90292 ("net: Add extack to upper device linking") which added an extra parameter to netdev_upper_dev_link() was added with kernel 4.15 and was not backported to kernel 4.14, activate this backport already for kernel 4.14. Fixes: 8cdd85766293 ("backports: add netdev_upper_dev_link() extack argument") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: timekeeping.h: Add ktime_get_ts64()Hauke Mehrtens
This function was added in commit d6d29896c665d ("timekeeping: Provide timespec64 based interfaces"). We can just use the 32 bit version instated as the rest was already backported in backports commit ea8b7cd797ca0c ("backports: deal with struct timespec64 changes)". Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: timekeeping.h: Add ktime_get_real_seconds()Hauke Mehrtens
This function was added in commit dbe7aa622db96b ("timekeeping: Provide y2038 safe accessor to the seconds portion of CLOCK_REALTIME") and is used by multiple realtek drivers. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: nospec.h: provide dummy header fileHauke Mehrtens
Older kernel versions do not have the include linux/nospec.h with the function array_index_nospec, provide a dummy implementation for these kernel versions and forward the call the the real version for capable kernel versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: debugfs.h: add DEFINE_DEBUGFS_ATTRIBUTEHauke Mehrtens
DEFINE_DEBUGFS_ATTRIBUTE and debugfs_create_file_unsafe() were introduced in mainline commit c6468808149 ("debugfs: add support for self-protecting attribute file fops"), but on older kernel versions where we do not have this extra security in debugfs we can use the older functions instead. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: kernel.h: include bug.hHauke Mehrtens
This prevents some compile problems in rtlwifi. Without this patch I am getting a compile error in drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c with multiple kernel versions because BUILD_BUG_ON_ZERO is implicitly defined. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21header: types.h: add __poll_tHauke Mehrtens
__poll_t was added for kernel 4.15 in commit 8ced390c2b ("define __poll_t, annotate constants"), add it here for older kernel versions. Multiple drivers are using this type. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21backport: poll.h: add include linux/eventpoll.hHauke Mehrtens
The POLL constants are getting replaced with the EPOLL constants. In this process commit e78cd95bebd9 ("preparation to switching ->poll() to returning EPOLL...") added an additional include to linux/poll.h. Some drivers make use of this indirect include now and fail to compile without it. Older kernel versions do not define all the EPON constants so add them if they are not available. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-03-21compat: timer.h: Remove last parameters from DEFINE_TIMERHauke Mehrtens
DEFINE_TIMER only has 2 parameters since kernel commit 1d27e3e2252ba ("timer: Remove expires and data arguments from DEFINE_TIMER") which was added with kernel 4.15. Add a version which translates between the new and the old API. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-28backport: move percpu.h file to the correct locationLuca Coelho
Mistakenly, the percpu.h file was added to a new backport-include directory at the root. It should be in the proper location at backport/backport-include instead. Fix that. Fixes: a4c44dbee35d ("backport: implement alloc_percpu_gfp() for < 3.18.") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23backport: increase max stack frame size compiler check to 1280Luca Coelho
The verification code has some large data variables that are allocated in the stack. Increase the maximum stack frame size in the compiler check slightly (from 1024 to 1280) to prevent harmless warnings. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23backport: remove stddef.h inclusionsLuca Coelho
The verification code was copied from userspace code which includes stddef.h. In the kernel, this header should not be included, so remove those cases. Fixes: 988e2af4b7a0 ("backports: add signature verification code") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23backports: fix typo "TIMKEEPING" and fix gfp.hLuca Coelho
There is a typo in the timekeeping.h backport, fix that. Additionally, fix the gfp.h file tha has a copy/paste issue where __BACKPORT_TIMKEEPING_H is used instead of __BACKPORT_LINUX_GFP_H. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23backport: add new build_bug.h fileLuca Coelho
Some of the code in bug.h was moved into a new build_bug.h file. Add a backport that includes bug.h in the case of older kernels. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23backport: update genl_dump_check_consistent() backportLuca Coelho
The genl_dump_check_consistent() function was changed in v4.15 to use only two arguments. The family is not needed anymore, because we were erroneously subtracting the header size and that was fixed in v4.15. Since the family was only used to check the header size, we can create a dummy with hdrsize = 0, which will allow us to call the old version of the function. There is a good side-effect to doing this: the bug is going to be fixed, because with hdrsize = 0 we will not subtract anything and it will have the same effect as the fix. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23backport: include lib/bucket_locks.cLuca Coelho
The alloc/free_bucket_spinlocks() functions were moved to a new lib file, namely bucket_locks.c. Add an auto-backport for the bucket_locks.c file and move the patching of the code that moved from rhashtable to bucket_locks.c. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23backport: add pcie_find_root_port()Luca Coelho
This function was introduced in v4.9 and added to 3.12.69, 4.4.37 and 4.8.13. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-23compat: only define thermal backports if CONFIG_THERMAL is enabledLuca Coelho
If CONFIG_THERMAL is not enabled, we don't have to add all backports for the thermal framework. Actually this doesn't even work because we try to use thermal_zone_device_register/unregister and they are not present in the outer kernel, causing undefined symbols warnings: WARNING: "thermal_zone_device_register" [/home/luca/iwlwifi/stack-dev/compat/compat.ko] undefined! WARNING: "thermal_zone_device_unregister" [/home/luca/iwlwifi/stack-dev/compat/compat.ko] undefined! Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-01-31backports: include linux/err.h in key.cWinnie Chang
Function IS_ERR, PTR_ERR and ERR_PTR are not found. Need to include linux/err.h to fix compiling errors. Signed-off-by: Winnie Chang <winnie.chang@cypress.com> Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-12-11backports: clean up kconf/conf when doing make mrproperChi-Hsien Lin
kconf/ is built during "make defconfig-*" but not cleaned up during "make mrproper" or "make clean". Add the clean up work to "make clean". Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-11-21backports: fix nlmsg_type on responses with extack backportFelix Fietkau
This is filled with family->id, which needs to be set after registering the copy. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-11-17backports: make extack backport compile on <3.13Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-11-17backports: fix missing linux/verification.h error on < 4.7Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-11-17backports: fix events with extack backportFelix Fietkau
The multicast group offset needs to be synced after registering the family, otherwise multicast messages will use the wrong id Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-11-17backport-include: backport skb_get_hash_perturbFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-11-17kconf: sync with upstream version 37861ffa8c28Felix Fietkau
Adds support for the imply keyword Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-11-13backports: netlink extack: Allow ext_ack to carry non-error messagesJohannes Berg
Backport upstream commit 4f6265d485ea0a2507692ded8ed47b323f49587c Author: David Ahern <dsahern@gmail.com> Date: Fri Oct 27 17:37:12 2017 -0700 netlink: Allow ext_ack to carry non-error messages Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-10-26backports: fix the extack backport for dumpsJohannes Berg
I also never seem to have really tested unload after dumps, and using the family->attrbuf was causing memory corruption in the copied family. Fix this by keeping track of the family copies separately and actually copying the attrbuf over so the family can use it from there. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-10-24backports: fix the extack backportJohannes Berg
I neglected to take into account that the spatch will also be applied to the backport-4.12.c file itself, fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-10-17backports: fully add netlink extack for generic netlinkJohannes Berg
The previous backport just made the code compatible, but removed the extack functionality entirely. By ignoring the setsockopt() and just assuming that userspace does in fact support extack (which is true for all of wifi and in fact all users of libnl), we can support full extack functionality even on kernels that don't support it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-10-13backports: remove CRYPTO_CCM backportJohannes Berg
This never actually worked properly as far as I can tell, and now it looks like it won't even compile due to the real crypto_memneq() backport. Just remove it - distro kernels have it enabled and all others should just enable it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-10-13backports: reduce mbedtls bignum stack usageJohannes Berg
mbedtls_mpi_exp_mod() uses almost 4k of memory, which really shouldn't be on the stack in the kernel. Signed-off-by: Johannes Berg <johannes.berg@intel.com>