From patchwork Tue Oct 11 21:04:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004358 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62CB5C4332F for ; Tue, 11 Oct 2022 21:05:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbiJKVFP (ORCPT ); Tue, 11 Oct 2022 17:05:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EC2320BDB for ; Tue, 11 Oct 2022 14:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=cKqpS/MhPr72hUmuZUfiH3UwLZbW8irQyKWeMiRSCz8=; t=1665522295; x=1666731895; b=SdhW05CNHMsSrns57cQcorMIBBncuI5v6t8TVIxa7IDcyev CCqYXM4XFyID9fB14n4U83cFag3vbTRo/e332F3SRXLeLI5qNzGOTFUhJLhxYge+4G2z+Er+Kh/mJ TTp6GH9L03GkZ2hBIBEswGhbC/s+dUz4RqaVHX0bxdjSg40hkNq/MtypaQxmoMqULf5F4VknFdfxh OB941AAvKfvid/SWv/E/n7LPsDL+IZRwg5qmuneRKjgGLUzTl5Mc1lN7C/Gvfz63ksnSn2TK0O1rr v3pVSslxasB2B7+szBDYsORLhGIywsUHgl5k8lgYWXRn40T/J1G4AjrtYYAEr2VA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQi-0045LP-2P; Tue, 11 Oct 2022 23:04:48 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Luca Coelho Subject: [PATCH 01/38] backport: update pv trace fixes patch Date: Tue, 11 Oct 2022 23:04:09 +0200 Message-Id: <20221011230356.adb82cf94151.Iad456095473d72f9fa005814c81b0b45be8e49a5@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Luca Coelho One argument was removed from a trace, so the old patch was not applying anymore. Update it. type=maint ticket=jira:WIFI-85592 Signed-off-by: Luca Coelho Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/135575 --- ...ivers_net_wireless_iwlwifi_iwl-debug.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch diff --git a/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch new file mode 100644 index 000000000000..870aa41f7745 --- /dev/null +++ b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch @@ -0,0 +1,64 @@ +--- a/drivers/net/wireless/intel/iwlwifi/iwl-debug.c ++++ b/drivers/net/wireless/intel/iwlwifi/iwl-debug.c +@@ -69,13 +69,16 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ + struct va_format vaf = { \ + .fmt = fmt, \ + }; \ +- va_list args; \ ++ va_list args1, args2; \ + \ +- va_start(args, fmt); \ +- vaf.va = &args; \ ++ va_start(args1, fmt); \ ++ va_copy(args2, args1); \ ++ vaf.va = &args2; \ + dev_ ##fn(dev, "%pV", &vaf); \ ++ va_end(args2); \ ++ vaf.va = &args1; \ + trace_iwlwifi_ ##fn(&vaf); \ +- va_end(args); \ ++ va_end(args1); \ + } + + __iwl_fn(warn) +@@ -94,13 +97,18 @@ void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only, + va_list args; + + va_start(args, fmt); +- vaf.va = &args; + if (!trace_only) { ++ va_list args2; ++ ++ va_copy(args2, args); ++ vaf.va = &args2; + if (rfkill_prefix) + dev_err(dev, "(RFKILL) %pV", &vaf); + else + dev_err(dev, "%pV", &vaf); ++ va_end(args2); + } ++ vaf.va = &args; + trace_iwlwifi_err(&vaf); + va_end(args); + } +@@ -117,12 +125,18 @@ void __iwl_dbg(struct device *dev, + va_list args; + + va_start(args, fmt); +- vaf.va = &args; + #ifdef CONFIG_IWLWIFI_DEBUG + if (iwl_have_debug_level(level) && +- (!limit || net_ratelimit())) ++ (!limit || net_ratelimit())) { ++ va_list args2; ++ ++ va_copy(args2, args); ++ vaf.va = &args2; + dev_printk(KERN_DEBUG, dev, "%s %pV", function, &vaf); ++ va_end(args2); ++ } + #endif ++ vaf.va = &args; + trace_iwlwifi_dbg(level, function, &vaf); + va_end(args); + } From patchwork Tue Oct 11 21:04:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004350 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DC77C4332F for ; Tue, 11 Oct 2022 21:05:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229633AbiJKVFK (ORCPT ); Tue, 11 Oct 2022 17:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FBC722BEA for ; Tue, 11 Oct 2022 14:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=fjx3SsFktLKgxODkCIHOB5G/dKYbW3gYapXz0bBCp+o=; t=1665522295; x=1666731895; b=O2pQG0qSjn2lLOI9CxOnK4lIgAFa4t7AzVG4YyTT3XbleTV bPQtRw4HUfZHgmY7bEYSD2iXnP2MNCcW2ODfIo23Zez4/FqDJTeE9eLCtwc7HPSzM6kD9vKBDpKm2 KBHf6rCTco1NFPKJ4f9LYNmPWBLPCHYZe/TeXJflgEuTqXTo26gANkYpd1ALyL6GNNCrvaVGUlXpS 6fi9s4AfpJfPBkwlI3HD/e9UoNNUUg+qVvkVrLEq8PR6xjLb2Cc7jg3yxx9UlIlOWmUG3p9g5xegI OfdOGLpYx71S5XD8pJwz/UwO7hfLWb9bjaGeFpRCnvcKzXMHN15mfpJLRGsLxtnA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQj-0045LP-06; Tue, 11 Oct 2022 23:04:49 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Luca Coelho Subject: [PATCH 02/38] backport: implement NLA_POLICY_RANGE for NLA_BINARY Date: Tue, 11 Oct 2022 23:04:10 +0200 Message-Id: <20221011230356.c8e47a959e6d.Ife595e2dc94955bda3d7d3089ec6a219fde272c1@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Luca Coelho The range checks for NLA_BINARY are supported since v5.10. Unwrap the macros and introduce a new function to test type. type=maint ticket=jira:WIFI-85592 Signed-off-by: Luca Coelho Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/135576 --- backport/backport-include/net/netlink.h | 31 +++++++++++++++++++--- patches/0097-nla_policy_binary_range.cocci | 5 ++++ 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 patches/0097-nla_policy_binary_range.cocci diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index 3c7fdc7e3e0f..e94f32626782 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -546,10 +546,33 @@ static inline void *nla_memdup(const struct nlattr *src, gfp_t gfp) } #endif /* < 4.9 */ -#ifndef NLA_POLICY_MIN_LEN -#define NLA_POLICY_MIN_LEN(_len) { \ - .type = NLA_BINARY \ +#if LINUX_VERSION_IS_LESS(5,10,0) +// pre-declare all the minimum lengths in use +#define MIN_LEN_VALIDATION(n) \ +static inline \ +int nla_validate_min_len_##n(const struct nlattr *attr, \ + struct netlink_ext_ack *extack) \ +{ \ + if (nla_len(attr) < n) \ + return -EINVAL; \ + return 0; \ } -#endif + +MIN_LEN_VALIDATION(2) +MIN_LEN_VALIDATION(16) +MIN_LEN_VALIDATION(42) + +// double-expansion to expand _min to the actual value +#define NLA_POLICY_BINARY_RANGE(_min, _max) _NLA_POLICY_BINARY_RANGE(_min, _max) +#define _NLA_POLICY_BINARY_RANGE(_min, _max) \ +{ \ + .type = NLA_BINARY, \ + .len = _max, \ + .validation_type = NLA_VALIDATE_FUNCTION, \ + .validate = nla_validate_min_len_ ## _min, \ +} +#else +#define NLA_POLICY_BINARY_RANGE(_min, _max) NLA_POLICY_RANGE(NLA_BINARY, _min, _max) +#endif /* < 5.10 */ #endif /* __BACKPORT_NET_NETLINK_H */ diff --git a/patches/0097-nla_policy_binary_range.cocci b/patches/0097-nla_policy_binary_range.cocci new file mode 100644 index 000000000000..cb3b8be52b51 --- /dev/null +++ b/patches/0097-nla_policy_binary_range.cocci @@ -0,0 +1,5 @@ +@@ +expression MIN, MAX; +@@ +-NLA_POLICY_RANGE(NLA_BINARY, MIN, MAX) ++NLA_POLICY_BINARY_RANGE(MIN, MAX) From patchwork Tue Oct 11 21:04:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B10BC433FE for ; Tue, 11 Oct 2022 21:05:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229655AbiJKVFN (ORCPT ); Tue, 11 Oct 2022 17:05:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F96A222B5 for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=kT5TIXie8nSZNU7V95ncfYqmYFnnIXEXOKjb1JlMsHo=; t=1665522295; x=1666731895; b=uf5NMbdqNdRArG3aMa3e2EBr7LyxNJuWOqeWuN0GfFPOPPi IxoNp3Vkfc7uDV4qnHSTtl9rIBy8OjV2XM2NApDdA69tFYPBzfCyf5vdPGMz62+DKD2gbQLwXsBtt dO4aF1S/mvtimFnB25KkeuyabaEdjWgDKVb3xHOwYAz6PQCt4iGNHQ9E/I7TFJ5VlVO31UpUpvviW yuTsoXW9Mse7r3tZRFakCC57733nL6L7ffogqu3wZC5e5Gl41Ja3mRJ3x4QGOMhWZ9WXuJ8gFjsbz pYnBeGUZJsHhwoGFkViqEA5yTdO9asNusG6fQAdEGHc+T7pDdREV+lHomFR5x2/w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQj-0045LP-14; Tue, 11 Oct 2022 23:04:49 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg , Luciano Coelho Subject: [PATCH 03/38] backports: bpgit: handle copied files properly in status() Date: Tue, 11 Oct 2022 23:04:11 +0200 Message-Id: <20221011230356.e477f575e241.I0331054c4f3fad9d33b9e51228dabd6a28bbf8fb@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg 'C' as the setatus also has two files, so need to continue as well to get the second file added to this line. Signed-off-by: Johannes Berg Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/135974 Reviewed-by: Luciano Coelho Tested-by: Luciano Coelho --- lib/bpgit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bpgit.py b/lib/bpgit.py index 9d35a3896ed9..77dab8bd2528 100644 --- a/lib/bpgit.py +++ b/lib/bpgit.py @@ -50,7 +50,7 @@ def status(tree=None): of the form ('XY', 'filename') or - ('XY', 'filename_to', 'filename_from') [if X is 'R' for rename] + ('XY', 'filename_to', 'filename_from') [if X is 'R' for rename or 'C' for copy] ''' cmd = ['git', 'status', '--porcelain', '-z'] @@ -70,7 +70,7 @@ def status(tree=None): cur.append(i[:2]) assert i[2] == ' ' cur.append(i[3:]) - if i[0] == 'R': + if i[0] in ['R', 'C']: continue else: cur.append(i) From patchwork Tue Oct 11 21:04:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F1D1C433FE for ; Tue, 11 Oct 2022 21:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229619AbiJKVFG (ORCPT ); Tue, 11 Oct 2022 17:05:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbiJKVE7 (ORCPT ); Tue, 11 Oct 2022 17:04:59 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F43621E24 for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=SJhyHaZpypWm2xpCjg6mWoj073ODuIjYqbaG8Ckgq68=; t=1665522295; x=1666731895; b=p24G3EOIK5aZ7yeD0HK95hCxLS5W9KIOMsiaiPVItEx2Os6 thfdpf+gpNhvSsP2a0Bklkzm0hBswSj2uMYSv3vyd6HjC3MJmiz0QQgOyvl7xOR/vyr8GrNWOpZa3 GBxiUzv+Oq/IMdUowDwRi2+fcFYPC+Tg6K+SXatpiIbHR0mIe2PBWqpVpvOgJUbaoKc8LAobCJoZQ LqJc+J7n9lwCNy85HLKe7r5k97LK10ABmZyuRC1yqNLce99Nbu3+heaN/i1lSfo86CTJJIS0PC4Zo rOSogoSpXENdSRv6t5FsWnksDhnE56IKBpEhtyp4VQ6iSlw1oFwT2yf6XTVyeVCw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQj-0045LP-26; Tue, 11 Oct 2022 23:04:49 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Luca Coelho Subject: [PATCH 04/38] backport: add dev_sw_netstats_tx/rx_add() functions Date: Tue, 11 Oct 2022 23:04:12 +0200 Message-Id: <20221011230356.2960f8b2fb4e.I16f0b19a20bfa28f277fa171600017bbdd4ed8b2@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Luca Coelho Two new functions were added in v5.10 and are now used in mac80211. Add them as bakcports in netdevice.h type=maint ticket=jira:WIFI-95070 Signed-off-by: Luca Coelho Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/139718 --- backport/backport-include/linux/netdevice.h | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index e17731909ca5..c6ca8b5556d5 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -111,6 +111,31 @@ void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, #define netif_rx_any_context LINUX_BACKPORT(netif_rx_any_context) int netif_rx_any_context(struct sk_buff *skb); + +static inline void dev_sw_netstats_rx_add(struct net_device *dev, unsigned int len) +{ + struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats); + + u64_stats_update_begin(&tstats->syncp); + tstats->rx_bytes += len; + tstats->rx_packets++; + u64_stats_update_end(&tstats->syncp); +} + +#endif /* < 5.10 */ + +#if LINUX_VERSION_IS_LESS(5,10,0) +static inline void dev_sw_netstats_tx_add(struct net_device *dev, + unsigned int packets, + unsigned int len) +{ + struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats); + + u64_stats_update_begin(&tstats->syncp); + tstats->tx_bytes += len; + tstats->tx_packets += packets; + u64_stats_update_end(&tstats->syncp); +} #endif /* < 5.10 */ #if LINUX_VERSION_IS_LESS(5,10,0) From patchwork Tue Oct 11 21:04:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004348 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A632CC4332F for ; Tue, 11 Oct 2022 21:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbiJKVFH (ORCPT ); Tue, 11 Oct 2022 17:05:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F556222A8 for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=6TbvNPpfVOQ/fOlKyLkhN8fj6WgIZKuDgHZjEknifI0=; t=1665522295; x=1666731895; b=oPKkDYAZq5DlbYka6SwuGeS9SfbAm4xRMh++1o4kpYSN+fs 3tdhQfGf6F42s+9cDpySN0rAdoou3p992l5RAe9V2zoo1/hO15Y+99OcL0ZSPNnpliot35YLvwKcw st0X7g1qR00R5tFzIWPZDV6Ki8XxbNPcrbWayk717DF887jLb5OpgpmG+sqLdkkoA92/xVuHgWNEq muhn5RkbnNkChCTCSslkuq2EnRl6nM5SAVGFHPNMbpSuo7Ck1MONjDE5kLdaicPbG/MW98dwsOefq sq0/r/qxl+HEAm837XkY/mmf4AEfLTndoATVVaF++d2Cm6u6ya0N8aQqbxpAvvKQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQj-0045LP-2z; Tue, 11 Oct 2022 23:04:50 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Luca Coelho Subject: [PATCH 05/38] backport: include kcov.h in sched.h for kernels < v4.10 Date: Tue, 11 Oct 2022 23:04:13 +0200 Message-Id: <20221011230356.d66a96d62361.Iee3a886f6b132d9f0a501fcace491dbb5d712500@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Luca Coelho In kernel v4.10 and later, kcov.h is included in sched.h. Now mac80211 uses some kcov functions, but doesn't include kcov.h explicitly, since it's included by sched.h. Include kvoc.h in kernels older than v4.10 to avoid compilation issues. type=maint ticket=jira:WIFI-95070 Signed-off-by: Luca Coelho Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/139719 --- backport/backport-include/linux/sched.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backport/backport-include/linux/sched.h b/backport/backport-include/linux/sched.h index 6a5cf8db6b8c..29659af437de 100644 --- a/backport/backport-include/linux/sched.h +++ b/backport/backport-include/linux/sched.h @@ -3,6 +3,9 @@ #include_next #include +#if LINUX_VERSION_IS_LESS(4,10,0) +#include +#endif /* LINUX_VERSION_IS_LESS(4,10,0) */ /* kcov was added in 4.6 and is included since then */ #if LINUX_VERSION_IS_LESS(4,6,0) From patchwork Tue Oct 11 21:04:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12BD4C43219 for ; Tue, 11 Oct 2022 21:05:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229589AbiJKVFI (ORCPT ); Tue, 11 Oct 2022 17:05:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiJKVE7 (ORCPT ); Tue, 11 Oct 2022 17:04:59 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EAA120BD8 for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Nu3TdfvE+J1WstyzbIYdp3nEZ9TMUs7ys2koe7Ycv1U=; t=1665522295; x=1666731895; b=fprWYTeqrOynhjKVPK8vP6OmbKYHYtxjnE0x0uX3TymkU+c I0mK+0FOI+sivhwPbEiWqS46PwLqrS2ewiSLZl4QmTwxYiZ+2mGCbMY6uQv6l9nYcOc1OmbCbjHl+ uzIj1GJXDxlnDeeQkzKonYbBraz2lxQ+Ht5M4E+QCm037JZMM1uFajqfMccnBlp7/SZCWXK55VgKH 8ykQZM7ie3qWdoZrvsseqDqOTyVwQUz1RpqwDrKi/3xleP1VfCaHpJYzU5YOfzBDv/GWyyYsQ8HV9 By6OBw4rSQ9umCVPrUCcmT4qMU97nMhszZLNXLN7xSG2YpfYDAVOA9G2iOh3InjA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQk-0045LP-0e; Tue, 11 Oct 2022 23:04:50 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Luca Coelho Subject: [PATCH 06/38] backports: increase cfg80211 wiphy padding Date: Tue, 11 Oct 2022 23:04:14 +0200 Message-Id: <20221011230356.91df2a084485.Icfb8295a72f19a169bef7ecee762ed693f923e65@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Luca Coelho The wiphy structure has grown over the 2048 bytes that we originally used in the wiphy padding, it's 2080 bytes long as of v5.11. Increase the padding to an arbitrary higher round number, 2304. We will end up using 2 pages now, so we could go as high as a page's length, but keep it lower so that when we grow over 2304 again we notice and can reasses the issue. type=maint ticket=none Signed-off-by: Luca Coelho Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/140382 --- patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch index a804077414d9..8f9b0985b769 100644 --- a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch +++ b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch @@ -4,7 +4,7 @@ /* assign these fields before you register the wiphy */ -+#define WIPHY_COMPAT_PAD_SIZE 2048 ++#define WIPHY_COMPAT_PAD_SIZE 2304 + u8 padding[WIPHY_COMPAT_PAD_SIZE]; + u8 perm_addr[ETH_ALEN]; From patchwork Tue Oct 11 21:04:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004351 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C062CC433FE for ; Tue, 11 Oct 2022 21:05:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229628AbiJKVFJ (ORCPT ); Tue, 11 Oct 2022 17:05:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FB2E22B2E for ; Tue, 11 Oct 2022 14:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=HBSiixcTod87tQzCN7L3quPYniLfoVK2OqfaLrXCpXw=; t=1665522295; x=1666731895; b=ohw59v5EP3exRUusu8P/pYkGAjVq6w90V0siat146mh6Tuq Az4pn5yNejPmver53GA9JNu7ojTNZ6im2LhryBtyw6No7x8jSiEZ6s0p5wGz+r+r6PfCESVuDebKo QORrdVudMnOmOOjzMGiOfCVMTOCu44g69jbgNp44cXsFP+m+jcQE9e1E/imVbSSyGzXgGKA7DNYoe pyyoI2CjIRK67TcaCO2Pgydn0pfOTWDVP3anLt8MxF9qoZijG4dUciKGfTeC1B5L1AsMwphG/AuUG FCfIWukjup0nQxaxwNjwcWs+cfzPW6jqcVeClRSRFoHpGWB0hB7TP5Mu93o6H/Pg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQk-0045LP-1Y; Tue, 11 Oct 2022 23:04:50 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Luca Coelho Subject: [PATCH 07/38] backport: remove aql_disable debugfs for < v4.10 Date: Tue, 11 Oct 2022 23:04:15 +0200 Message-Id: <20221011210446.144768-2-johannes@sipsolutions.net> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Luca Coelho The static_key implementation has changed considerably in v4.10 and is only used in a new debugfs entry in mac80211. It's very hard to backport the new static_key implementation, and not worth the trouble for a functionality that will probably never be used. type=maint ticket=jira:WIFI-116062 Signed-off-by: Luca Coelho --- patches/0101-remove_aql_disable.cocci | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 patches/0101-remove_aql_disable.cocci diff --git a/patches/0101-remove_aql_disable.cocci b/patches/0101-remove_aql_disable.cocci new file mode 100644 index 000000000000..838d9d49e84a --- /dev/null +++ b/patches/0101-remove_aql_disable.cocci @@ -0,0 +1,39 @@ +@aql_ops@ +identifier aql_disable_write, aql_disable_read; +identifier simple_open, default_llseek; +@@ ++#if LINUX_VERSION_IS_GEQ(4,10,0) +static const struct file_operations aql_enable_ops = { + .write = aql_disable_write, + .read = aql_disable_read, + .open = simple_open, + .llseek = default_llseek, +}; ++#endif + +@@ +identifier aql_ops.aql_disable_write; +@@ ++#if LINUX_VERSION_IS_GEQ(4,10,0) +aql_disable_write(...) +{ +... +} ++#endif + +@@ +identifier aql_ops.aql_disable_read; +@@ ++#if LINUX_VERSION_IS_GEQ(4,10,0) +aql_disable_read(...); +{ +... +} ++#endif + +@@ +expression e; +@@ ++#if LINUX_VERSION_IS_GEQ(4,10,0) +DEBUGFS_ADD_MODE(aql_enable, e); ++#endif From patchwork Tue Oct 11 21:04:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA692C4332F for ; Tue, 11 Oct 2022 21:04:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229618AbiJKVE6 (ORCPT ); Tue, 11 Oct 2022 17:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiJKVE6 (ORCPT ); Tue, 11 Oct 2022 17:04:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ECC621247 for ; Tue, 11 Oct 2022 14:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=9IukzCWtuW8Ze6KFDWzMAH9zqxlQMPnEUQBeIiWgXtw=; t=1665522295; x=1666731895; b=lc/LgemNcwsi/iVR1iGY9WBHPw/Pd42CV69MNY+GxGzTWzs 0c1WOz5rA20WjRZDfRJ8FkI14L4XXjmcObmJK4F2/D0q+lvqFfQ2vcHomAw1TzePHmN+3HH2Xwj7W YfV7cjuM5xEiczyBtUMDDHslJzzc9Dmqs0102IYIU7RphQlVe4sxcQyw3MvvfDlDsr2WHQ5HLMJlk mah680llEp1lyDb7kQ2kX1qHVuIpJDCZvUx2vbnsfKw04FIitg3GLHYHdsbcP0qx91uPc3EoT8OEW Ls7AxHLuEs19nyWPsH1z8T7xkL03a95TrPWIw6b5MDJrntuazOMrtIDYThLDRQ9A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQk-0045LP-2P; Tue, 11 Oct 2022 23:04:50 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Luca Coelho Subject: [PATCH 08/38] backport: update iwl-debug patch Date: Tue, 11 Oct 2022 23:04:16 +0200 Message-Id: <20221011230356.782b54edee59.I6eec7e271e27203f0c7bc69672d5d375abd61f9e@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Luca Coelho Some code had to be moved around a bit. Update the patch. type=maint ticket=jira:WIFI-175745 Signed-off-by: Luca Coelho --- ...ivers_net_wireless_iwlwifi_iwl-debug.patch | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch index 870aa41f7745..e8f943f46395 100644 --- a/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch +++ b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch @@ -1,6 +1,8 @@ +diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-debug.c b/drivers/net/wireless/intel/iwlwifi/iwl-debug.c +index ae4c2a3d63d5..339062da2917 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-debug.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-debug.c -@@ -69,13 +69,16 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ +@@ -15,13 +15,16 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ struct va_format vaf = { \ .fmt = fmt, \ }; \ @@ -21,27 +23,7 @@ } __iwl_fn(warn) -@@ -94,13 +97,18 @@ void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only, - va_list args; - - va_start(args, fmt); -- vaf.va = &args; - if (!trace_only) { -+ va_list args2; -+ -+ va_copy(args2, args); -+ vaf.va = &args2; - if (rfkill_prefix) - dev_err(dev, "(RFKILL) %pV", &vaf); - else - dev_err(dev, "%pV", &vaf); -+ va_end(args2); - } -+ vaf.va = &args; - trace_iwlwifi_err(&vaf); - va_end(args); - } -@@ -117,12 +125,18 @@ void __iwl_dbg(struct device *dev, +@@ -73,12 +76,18 @@ void __iwl_dbg(struct device *dev, va_list args; va_start(args, fmt); From patchwork Tue Oct 11 21:04:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004356 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15874C43217 for ; Tue, 11 Oct 2022 21:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229653AbiJKVFN (ORCPT ); Tue, 11 Oct 2022 17:05:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E8982019E for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=qBSi4tOYNjLsxkWAR/PSJiKBdkukvzKA5pVY1qt2nuI=; t=1665522295; x=1666731895; b=lfMfe++WFIowrawd8f99r0tfMccRVh+GBq+wthRBHz0KJkE me9VoSDbNJRNPrvbD3ejxOu6123U8/7FKvr05WP2X0fBz601Tsq7ieUls9BEHehZH+wwIROikZbpk pk8LEZL/qaLr4v/SEuKyUSVBr9qvxvXpSIp4BZFNb9Hi8qvw5HPLVe8TuAawysjiMMynQUbWQlzsH YF30Uk7MjI2yloSkb0qstLJsUtKoQcBcR/FwJkZtAWTCo1qzbncyYV5Zuqt993jSjbeeMeWpc8Ay1 pyAei2G4BP44IAYdamrDro5fd/WyGE8aQp/U6KyCFToNgX5b89x6F3H03IOlrLmA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQl-0045LP-0C; Tue, 11 Oct 2022 23:04:51 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg , Luciano Coelho Subject: [PATCH 09/38] main: add module_exit() Date: Tue, 11 Oct 2022 23:04:17 +0200 Message-Id: <20221011230356.75710624f93f.I1ef27160b229985f1bf154a8cc3d6f6b08328895@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This is needed since we have module_init() and otherwise the kernel cannot unload the module again. Signed-off-by: Johannes Berg Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/149476 Reviewed-by: Luciano Coelho Tested-by: Luciano Coelho --- backport/compat/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backport/compat/main.c b/backport/compat/main.c index 17ade98b8b51..ba1422b5d778 100644 --- a/backport/compat/main.c +++ b/backport/compat/main.c @@ -71,3 +71,8 @@ static int __init backport_init(void) return 0; } subsys_initcall(backport_init); + +static void __exit backport_exit(void) +{ +} +module_exit(backport_exit); From patchwork Tue Oct 11 21:04:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004346 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9F09C43217 for ; Tue, 11 Oct 2022 21:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbiJKVFF (ORCPT ); Tue, 11 Oct 2022 17:05:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbiJKVE7 (ORCPT ); Tue, 11 Oct 2022 17:04:59 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E963205F9 for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=RK7fnMKD/8RKFG5Iq86GkD6uix3KhD14ieOadtyGsrY=; t=1665522295; x=1666731895; b=Ku7qvbMN4Vky7Bb70cts5P75mCciqUfhIFKzBaW65S4JIhM 2lsIEb2TOzJbxrgBhA5uJ8FITW9ggo8dPti2CfmE0GPcmBHx8shU7seje7HuSBHRQgjZcy2QZZbWy FoEOSF3wVdu/bXrIcq8Ul6p/vCF+qKwF5ZsE01jEl5P4YzpLEcnc1KKXh99b8Zx+VjaSAB2TSrRa9 JKZN1vIisMn/H88N0ARJstqLiXcvOhO/3lzm1wAFgfcdTJhcYxzpP52sLhiobTc4cK8DTyQUPz6R8 Dhj2W2bvX9KTGh3HrnxlaYpCooq7GttX+uKIBhxelwMQBqMeeJ2Ei0x1S2tBlsbA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQl-0045LP-1C; Tue, 11 Oct 2022 23:04:51 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg , Luciano Coelho Subject: [PATCH 10/38] backports: add kthread.h Date: Tue, 11 Oct 2022 23:04:18 +0200 Message-Id: <20221011230356.6f6ee6b34e1e.I0c3c1ed3d75dcd800d0a4ef41943a4db10ea5df4@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg In 5.17, complete_and_exit() gets replaced by kthread_complete_and_exit(), so support that API. Signed-off-by: Johannes Berg Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/149477 Reviewed-by: Luciano Coelho Tested-by: Luciano Coelho --- backport/backport-include/linux/kthread.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/kthread.h diff --git a/backport/backport-include/linux/kthread.h b/backport/backport-include/linux/kthread.h new file mode 100644 index 000000000000..23a599e92b30 --- /dev/null +++ b/backport/backport-include/linux/kthread.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_LINUX_KTHREAD_H +#define __BACKPORT_LINUX_KTHREAD_H +#include_next + +#if LINUX_VERSION_IS_LESS(5,17,0) +static inline void __noreturn +kthread_complete_and_exit(struct completion *c, long ret) +{ + complete_and_exit(c, ret); +} +#endif /* < 5.17 */ + +#endif /* __BACKPORT_LINUX_KTHREAD_H */ From patchwork Tue Oct 11 21:04:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17083C433FE for ; Tue, 11 Oct 2022 21:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229613AbiJKVFE (ORCPT ); Tue, 11 Oct 2022 17:05:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiJKVE6 (ORCPT ); Tue, 11 Oct 2022 17:04:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FF3C237DC for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=yUBGen2yuvnIFskP9INjCc7v3FSjgu7Azyc07Mp54QI=; t=1665522295; x=1666731895; b=WZZpKWpADrrsj1Z4u+tOdl3qS+cwrVait+zhkmWTZ8DslqL QiTQsXQzeAd5s1kixkyGIoxhbKLBvcHHhHqLw6RU6enNgeu/e1ZwIn35PSWkyhqQ7J/bqYUB8ytta FqEv2i0j2x7jcjLwdQBLF7qkkT2kSFAx4GNyjqU73BkE40zXt/UIv5fmbGC4x1XybShtxPprbq+0K mdw/UPh0BoYvNdl7KNIbmHoMYnVkhv5IktAHj92zYGkDzM1A8Qb2c7g6d1tKSumphnmtY1IMVYzgD bNlsESfehJKf0e9p0lr3rKvrjLtZaMvNrtm0t4plgCFLjzOZVq36+T2tTitOvlSw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQl-0045LP-2E; Tue, 11 Oct 2022 23:04:51 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 11/38] backports: stub structs but remove ndo_fill_forward_path Date: Tue, 11 Oct 2022 23:04:19 +0200 Message-Id: <20221011230356.fc6d493894a6.I59271805ee60501a03c50f5ec05240393f1fb4be@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/netdevice.h | 55 +++++++++++++++++++++ patches/0107-net-forward-path.cocci | 19 +++++++ 2 files changed, 74 insertions(+) create mode 100644 patches/0107-net-forward-path.cocci diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index c6ca8b5556d5..d2e175243560 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -199,4 +199,59 @@ static inline void backport_dev_hold(struct net_device *dev) #define dev_hold LINUX_BACKPORT(dev_hold) #endif /* < 5.15 */ +#ifndef NET_DEVICE_PATH_STACK_MAX +enum net_device_path_type { + DEV_PATH_ETHERNET = 0, + DEV_PATH_VLAN, + DEV_PATH_BRIDGE, + DEV_PATH_PPPOE, + DEV_PATH_DSA, +}; + +struct net_device_path { + enum net_device_path_type type; + const struct net_device *dev; + union { + struct { + u16 id; + __be16 proto; + u8 h_dest[ETH_ALEN]; + } encap; + struct { + enum { + DEV_PATH_BR_VLAN_KEEP, + DEV_PATH_BR_VLAN_TAG, + DEV_PATH_BR_VLAN_UNTAG, + DEV_PATH_BR_VLAN_UNTAG_HW, + } vlan_mode; + u16 vlan_id; + __be16 vlan_proto; + } bridge; + struct { + int port; + u16 proto; + } dsa; + }; +}; + +#define NET_DEVICE_PATH_STACK_MAX 5 +#define NET_DEVICE_PATH_VLAN_MAX 2 + +struct net_device_path_stack { + int num_paths; + struct net_device_path path[NET_DEVICE_PATH_STACK_MAX]; +}; + +struct net_device_path_ctx { + const struct net_device *dev; + const u8 *daddr; + + int num_vlans; + struct { + u16 id; + __be16 proto; + } vlan[NET_DEVICE_PATH_VLAN_MAX]; +}; +#endif /* NET_DEVICE_PATH_STACK_MAX */ + #endif /* __BACKPORT_NETDEVICE_H */ diff --git a/patches/0107-net-forward-path.cocci b/patches/0107-net-forward-path.cocci new file mode 100644 index 000000000000..f612239404a6 --- /dev/null +++ b/patches/0107-net-forward-path.cocci @@ -0,0 +1,19 @@ +@ops@ +identifier ops, fn; +@@ +const struct net_device_ops ops = { ++#if LINUX_VERSION_IS_GEQ(5,13,0) + .ndo_fill_forward_path = fn, ++#endif + ... +}; + +@@ +identifier ops.fn; +@@ ++#if LINUX_VERSION_IS_GEQ(5,13,0) +int fn(...) +{ +... +} ++#endif /* LINUX_VERSION_IS_GEQ(5,13,0) */ From patchwork Tue Oct 11 21:04:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32DBAC4332F for ; Tue, 11 Oct 2022 21:05:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiJKVE7 (ORCPT ); Tue, 11 Oct 2022 17:04:59 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E8D820366 for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=HTojVczOqNpdUuO6HihcRRSuLa1fJio1fhA6mEj3t/4=; t=1665522295; x=1666731895; b=Aa1Zt0a01GGjvTwq6e1NDsq/tR4/lw9Hz1Cr6SAfcUjLKTN 5vFTl2F2to8/E8tiPRDJ6SzlTAp/qYFsISbqk/Gcmf1JbOZa9buXK6XbFC1K2dQv2MuioQF9nhsg3 PWQM9qcDoJPYMTfWp3c/xedHWhVlJr/5nOyXxp46kHE528g1Q/uRAA1uZaVcNkE8msG0zkoEqde8x aL31nZJGL8+aFNF2vBknKgrAgPcg9KYDxpZftOjJQyTVVNXdxszdXEDdcItEYK8MyUiqYPzwbfrU5 g5A+S4fT3qkBrO6NZ7F044g+iyvauDM4P6n8Tgp7yYrqvXQYeZS0td12SJEzah1A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQl-0045LP-3C; Tue, 11 Oct 2022 23:04:52 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 12/38] backports: add memset_after/memset_startat Date: Tue, 11 Oct 2022 23:04:20 +0200 Message-Id: <20221011230356.04e4d975f11d.I22eae0fdc7b78cf10a7dee6fe477fbf0c9a5e807@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/string.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/backport/backport-include/linux/string.h b/backport/backport-include/linux/string.h index 39257e5f66ab..dc29dcf72b24 100644 --- a/backport/backport-include/linux/string.h +++ b/backport/backport-include/linux/string.h @@ -12,4 +12,24 @@ extern void *memdup_user_nul(const void __user *, size_t); int match_string(const char * const *array, size_t n, const char *string); #endif /* LINUX_VERSION_IS_LESS(4,5,0) */ +#ifndef memset_after +#define memset_after(obj, v, member) \ +({ \ + u8 *__ptr = (u8 *)(obj); \ + typeof(v) __val = (v); \ + memset(__ptr + offsetofend(typeof(*(obj)), member), __val, \ + sizeof(*(obj)) - offsetofend(typeof(*(obj)), member)); \ +}) +#endif + +#ifndef memset_startat +#define memset_startat(obj, v, member) \ +({ \ + u8 *__ptr = (u8 *)(obj); \ + typeof(v) __val = (v); \ + memset(__ptr + offsetof(typeof(*(obj)), member), __val, \ + sizeof(*(obj)) - offsetof(typeof(*(obj)), member)); \ +}) +#endif + #endif /* __BACKPORT_LINUX_STRING_H */ From patchwork Tue Oct 11 21:04:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004352 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83CF4C43219 for ; Tue, 11 Oct 2022 21:05:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbiJKVFL (ORCPT ); Tue, 11 Oct 2022 17:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FFF224098 for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=dVIZglvVy9w3Ogon4HgeSzfVKYM8w3oZJ7EPIyz4ago=; t=1665522295; x=1666731895; b=tnNZC/cuUmQoGehiWVOsWgtSRhvgv2oZD977loLRI6X9Ttu mFdypsn4wCzwsd7M76BQUfT7FTlyIejnMwwdTPuc7T4xK5q09o+qvVteJCYpr6Gedc3pLSnXAN9F+ KHDcUYyJZMdq76RNeXmJfJw7oPCd071ioRI4RRz8E/4XVwQGvQ31+a2hRFEgThxiyUWgmdl3KDWWK OzzjIMM7I1D3OUwG7Mep4g5rdO/AXnbI+SCmaL/hEFg95wQtf61jGKh62HrVRY/n2JZbdZ/qRh5w1 xpYFfuskA2HCMlih7vC9GVRiMrLA4v/gWV3gYceJYF1KLuBkgt5NvB8Gt4n+A5aQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQm-0045LP-0s; Tue, 11 Oct 2022 23:04:52 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 13/38] backports: add ktime_get_coarse_boottime_ns Date: Tue, 11 Oct 2022 23:04:21 +0200 Message-Id: <20221011230356.b622d5835831.Id1c6b53e4c57d92eb838e4c09ef8042cd42f150f@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg ... and simplify the code while at it. Signed-off-by: Johannes Berg --- backport/backport-include/linux/timekeeping.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h index 80c625569d6e..87744572bce6 100644 --- a/backport/backport-include/linux/timekeeping.h +++ b/backport/backport-include/linux/timekeeping.h @@ -6,23 +6,18 @@ #include_next #if LINUX_VERSION_IS_LESS(5,3,0) -#define ktime_get_boottime_ns LINUX_BACKPORT(ktime_get_boottime_ns) -static inline u64 ktime_get_boottime_ns(void) -{ - return ktime_get_boot_ns(); -} +#define ktime_get_boottime_ns ktime_get_boot_ns +#define ktime_get_coarse_boottime_ns ktime_get_boot_ns #endif /* < 5.3 */ #if LINUX_VERSION_IS_LESS(4,18,0) extern time64_t ktime_get_boottime_seconds(void); -#endif /* < 4.18 */ -#if LINUX_VERSION_IS_LESS(4,18,0) #define ktime_get_raw_ts64 LINUX_BACKPORT(ktime_get_raw_ts64) static inline void ktime_get_raw_ts64(struct timespec64 *ts) { return getrawmonotonic64(ts); } -#endif +#endif /* < 4.18 */ #endif /* __BACKPORT_TIMEKEEPING_H */ From patchwork Tue Oct 11 21:04:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004344 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F1BBC4321E for ; Tue, 11 Oct 2022 21:05:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229722AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiJKVE6 (ORCPT ); Tue, 11 Oct 2022 17:04:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FE982317E for ; Tue, 11 Oct 2022 14:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=aKpASQxM+L1ao/hUZiGp7bz/wsNaofKipVnIHGWs+fg=; t=1665522295; x=1666731895; b=LUnkcaDo2XxOasU34kIbAlfZWdfyC6UCrreUwryT2QZOsd9 xJQCAdHeHoKFc5KCBKkogOduUjA+LpkQY4HUpkMt3ggLHMvumckeUXpzmQe29dH+fFAIppKj0/6G5 c+DfTwLwhwP4gPe9jET3vtXFU6jUz49uh7Vp7VHuk/+ueBTJafpeR3TW5THRGUxcLUKndbBYta9ww yfWUQR8uHwE3VpmAEzlNS5GJqxygkXrFvMhIEKoHRLLK5iM9S7z75bGMYF4P1M5HDx0YgTQim6m0X 1itR82mhepwKWmx7tUeXwF2New0NdsYboSeyrR9bzCP+XzWZdEfJFvUtkKaYFtFQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQm-0045LP-1n; Tue, 11 Oct 2022 23:04:52 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 14/38] patches: add spatch to adjust to changed ethtool ringparam API Date: Tue, 11 Oct 2022 23:04:22 +0200 Message-Id: <20221011230356.4d7ccb57c7e8.I18f41541a5b4c6f8285a78d32203e6dbc35a5105@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This changed in 5.17-rc1, so add the necessary ifdefs via a new spatch. Signed-off-by: Johannes Berg --- patches/0106-ethtool-ringparam.cocci | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 patches/0106-ethtool-ringparam.cocci diff --git a/patches/0106-ethtool-ringparam.cocci b/patches/0106-ethtool-ringparam.cocci new file mode 100644 index 000000000000..b131d52039ca --- /dev/null +++ b/patches/0106-ethtool-ringparam.cocci @@ -0,0 +1,45 @@ +@set@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .set_ringparam = fn, + ... +}; + +@@ +identifier set.fn; +identifier dev, rp, krp, extack; +@@ +int fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) + , struct kernel_ethtool_ringparam *krp, + struct netlink_ext_ack *extack ++#endif + ) +{ +... +} + +@get@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .get_ringparam = fn, + ... +}; + +@@ +identifier get.fn; +identifier dev, rp, krp, extack; +@@ +void fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) + , struct kernel_ethtool_ringparam *krp, + struct netlink_ext_ack *extack ++#endif + ) +{ +... +} From patchwork Tue Oct 11 21:04:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC9C2C433FE for ; Tue, 11 Oct 2022 21:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbiJKVE6 (ORCPT ); Tue, 11 Oct 2022 17:04:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCD122BF3 for ; Tue, 11 Oct 2022 14:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Si81MMayOwsfyV3fPViHu9y8h6O041BjUnC6ZkNG0RI=; t=1665522295; x=1666731895; b=wiWUhpE/01Ftaw9OXIaMtymz55XtAVqz3h0wRfyAWJN07Kr y7CEzXA/YtPiuGWA8+wEHQ+uQ5h5QwBXKhijZyFD79hAfI+I4g2shOvL0vfkWjo7vAbT8B1/4h49B 6+AL96c1ZZJ1jLaGMYzmhvYRk6AvNwPBRhLw793IlEaI20khpqqILPg4ey5goAyCeIYdOUEXUsQ0p hoIeSX6gWDjQzzIyj/rxmsKirdSdYyXXaiaAz3DTtIOGR2hAxfPhBuHvqCRwpnFCj4T+aePvH85c5 rRtfy9nzYOEH3BV0/ZUEAlzEiKnb5i22GR2AQfouljPaaMW9OeQVzuLfSvbLvTZA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQm-0045LP-2u; Tue, 11 Oct 2022 23:04:53 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Gregory Greenman Subject: [PATCH 15/38] backport: update 0099-netlink-range patch to apply on v5.18-rc1 Date: Tue, 11 Oct 2022 23:04:23 +0200 Message-Id: <20221011230356.3b3e3538672a.Ifef23e899348f4ad263085e37e23b73acb2ab8a3@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Gregory Greenman For NL80211_ATTR_HE_CAPABILITY we now use NLA_POLICY_VALIDATE_FN(), so the patch doesn't apply. Fix it. type=maint ticket=none Signed-off-by: Gregory Greenman --- patches/0099-netlink-range/mac80211.patch | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/patches/0099-netlink-range/mac80211.patch b/patches/0099-netlink-range/mac80211.patch index bc55cc2f15bd..58027b0fb124 100644 --- a/patches/0099-netlink-range/mac80211.patch +++ b/patches/0099-netlink-range/mac80211.patch @@ -1,6 +1,6 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -412,10 +412,15 @@ static const struct nla_policy +@@ -421,10 +421,15 @@ static const struct nla_policy nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = { [NL80211_FILS_DISCOVERY_ATTR_INT_MIN] = NLA_POLICY_MAX(NLA_U32, 10000), [NL80211_FILS_DISCOVERY_ATTR_INT_MAX] = NLA_POLICY_MAX(NLA_U32, 10000), @@ -55,19 +55,3 @@ [NL80211_ATTR_MAC_HINT] = NLA_POLICY_EXACT_LEN_WARN(ETH_ALEN), [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 }, [NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 }, -@@ -720,10 +739,15 @@ static const struct nla_policy nl80211_p - [NL80211_ATTR_TXQ_LIMIT] = { .type = NLA_U32 }, - [NL80211_ATTR_TXQ_MEMORY_LIMIT] = { .type = NLA_U32 }, - [NL80211_ATTR_TXQ_QUANTUM] = { .type = NLA_U32 }, -+#if LINUX_VERSION_IS_GEQ(5,10,0) - [NL80211_ATTR_HE_CAPABILITY] = - NLA_POLICY_RANGE(NLA_BINARY, - NL80211_HE_MIN_CAPABILITY_LEN, - NL80211_HE_MAX_CAPABILITY_LEN), -+#else -+ [NL80211_ATTR_HE_CAPABILITY] = { .type = NLA_BINARY, -+ .len = NL80211_HE_MAX_CAPABILITY_LEN }, -+#endif - [NL80211_ATTR_FTM_RESPONDER] = - NLA_POLICY_NESTED(nl80211_ftm_responder_policy), - [NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1), From patchwork Tue Oct 11 21:04:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004354 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96B1DC4332F for ; Tue, 11 Oct 2022 21:05:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229484AbiJKVFM (ORCPT ); Tue, 11 Oct 2022 17:05:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FE442315A for ; Tue, 11 Oct 2022 14:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=q91omgqyKRyzZ0rOac/AkunD6L+U3ok8mBQTmaNpjGM=; t=1665522295; x=1666731895; b=XqPiTuAEBj+P5rfJqOeff3khDhMQ4IknYfmCIe4sAWBVFGR /h5ccQj6dAKEeIgDcqaLuEVeacuEoxCp50X/y5bEV2bVnkeKmaN1W/P+46qwm3EMmlcveLQ+M5K79 A1fFt6qtLcqA8BShUwadsKTVBbb0t0y5SsR87hClTawXjzhhKIttRMXP7TLpQX9RMZm4T6TfSGHPx xz9C6rTbnXmjyphsXzbiqRX+V/6KxZ4fwLOyjZ18B9imPW4qaR1Phybh/jh4dMEZLkA06RUByoVSa Bh74gYPUEmvGAvPi20JrkW0JHrpZBVUcl95cw39l2GlCl3s+6Dx5S8POD2EuRqOg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQn-0045LP-0c; Tue, 11 Oct 2022 23:04:53 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Gregory Greenman Subject: [PATCH 16/38] backports: add DMI_OEM_STRING for older kernels Date: Tue, 11 Oct 2022 23:04:24 +0200 Message-Id: <20221011230356.4447b8084079.I56742f3d6a096fd6c246fdf341af68b0962bdb90@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Gregory Greenman type=maint ticket=none Signed-off-by: Gregory Greenman --- backport/backport-include/linux/mod_devicetable.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backport/backport-include/linux/mod_devicetable.h b/backport/backport-include/linux/mod_devicetable.h index fc9beedb2d8d..07d66a6ba6ae 100644 --- a/backport/backport-include/linux/mod_devicetable.h +++ b/backport/backport-include/linux/mod_devicetable.h @@ -29,4 +29,8 @@ struct mhi_device_id { }; #endif +#if LINUX_VERSION_IS_LESS(4,17,0) +#define DMI_OEM_STRING (DMI_STRING_MAX + 1) +#endif /* < 4.17.0 */ + #endif /* __BACKPORT_MOD_DEVICETABLE_H */ From patchwork Tue Oct 11 21:04:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 453C8C43217 for ; Tue, 11 Oct 2022 21:05:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229563AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbiJKVE6 (ORCPT ); Tue, 11 Oct 2022 17:04:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7E32248CA for ; Tue, 11 Oct 2022 14:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=xXYFXpikx8brd1Ao0HU0D3eAkU+Yt+ZgPmsOjx/inLU=; t=1665522295; x=1666731895; b=KCqgeBSEivxje3IcfTjwEAMG0ugebkQ0nLJ9Y5JsbPhEmOT 2zATACaBb71RKBslV8KqTKPS80WjekwpsQpU3PkBNmsw8LhWUDRJ+0bV9EJpRNMKkiIP+ksupYZnk gA8VdcjLMwgqDgM/1tr7H2K+xw5P3e9Q2shII97hxk8sOQlYbPMVJjG9UGdeiMAmHj5Nx/BHsZ6JR l5UWATx04nMNERdG3pdIP0XpuJHzceRWxFtDXVW6TkhXykwqq0yEAl3So/TdtuojvNBqx8Ruzpa/9 D86Uk03y6L2dMrH3C2AxQDQnXdopyzG8vrtMRtXLqgVIRvf9WhspRfYY6bnp+A7g==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQn-0045LP-1b; Tue, 11 Oct 2022 23:04:53 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Gregory Greenman Subject: [PATCH 17/38] backports: define __is_constexpr() for older kernels Date: Tue, 11 Oct 2022 23:04:25 +0200 Message-Id: <20221011230356.1c8492a8a107.Ib82d1b3349ab6fc55b5f17dba1ada60601dcd742@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Gregory Greenman type=maint ticket=none Signed-off-by: Gregory Greenman --- backport/backport-include/linux/kernel.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h index 36bb755e353c..2555e3c4a0a8 100644 --- a/backport/backport-include/linux/kernel.h +++ b/backport/backport-include/linux/kernel.h @@ -5,6 +5,17 @@ #include #include +#if LINUX_VERSION_IS_LESS(4,17,0) + +/* + * This returns a constant expression while determining if an argument is + * a constant expression, most importantly without evaluating the argument. + * Glory to Martin Uecker + */ +#define __is_constexpr(x) \ + (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8))) + +#endif /* < 4.17.0 */ #if LINUX_VERSION_IS_LESS(4,6,0) #define kstrtobool LINUX_BACKPORT(kstrtobool) From patchwork Tue Oct 11 21:04:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 141E5C4321E for ; Tue, 11 Oct 2022 21:05:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbiJKVFM (ORCPT ); Tue, 11 Oct 2022 17:05:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbiJKVFA (ORCPT ); Tue, 11 Oct 2022 17:05:00 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB643240AA for ; Tue, 11 Oct 2022 14:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Pra0M2GZvkjUVoyuaWFXoJIsZwMr0W3mLGKQijSV4Ko=; t=1665522295; x=1666731895; b=M+MjYWBspMgd/DefCaph12Gt8sAPCptln4h3Csq7TQEPQb7 TN9OfR8qW+ODrYR7Z7j/0vggcWjvfy6/5SnClyjJzqCSTtslLoYC1pCI4c9/YcpScvIxjiuJvh1uK 5bdzZxIZAfKXecjfkcYTjI1/qugVgzDAdh3Veip6Pvcz/YGhD+6PaRSsCFBOEmEG/w/pwnrtHulVB GlI97IF/+zXKqvONZet+2B2w2lTjNY3gpXEarmRDmFMpdMUbIAaiZb7h96hdVMcsullvc0+9eKa6t ASrBXqc9LBcrXeH0a9T2xIweELT3ImqV9uAV6toIDMRuFtwDEtUT+EFlYlzoyBZA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQn-0045LP-2Z; Tue, 11 Oct 2022 23:04:53 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Gregory Greenman Subject: [PATCH 18/38] backports: update x509.asn1.[ch] Date: Tue, 11 Oct 2022 23:04:26 +0200 Message-Id: <20221011230356.c821b5ac8818.I6785155fcf6c1b377312eb2fdabae3b422cc17ca@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Gregory Greenman In v5.18-rc1 a few functions were renamed: x509_note_pkey_algo() => x509_note_sig_algo() algo_oid => sig_algo Adjust for this change. type=maint ticket=none Signed-off-by: Gregory Greenman --- backport/compat/verification/x509.asn1.c | 10 +++++----- backport/compat/verification/x509.asn1.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backport/compat/verification/x509.asn1.c b/backport/compat/verification/x509.asn1.c index e68864b6a1f5..590154e21da2 100644 --- a/backport/compat/verification/x509.asn1.c +++ b/backport/compat/verification/x509.asn1.c @@ -14,8 +14,8 @@ enum x509_actions { ACT_x509_note_not_after = 4, ACT_x509_note_not_before = 5, ACT_x509_note_params = 6, - ACT_x509_note_pkey_algo = 7, - ACT_x509_note_serial = 8, + ACT_x509_note_serial = 7, + ACT_x509_note_sig_algo = 8, ACT_x509_note_signature = 9, ACT_x509_note_subject = 10, ACT_x509_note_tbs_certificate = 11, @@ -31,8 +31,8 @@ static const asn1_action_t x509_action_table[NR__x509_actions] = { [ 4] = x509_note_not_after, [ 5] = x509_note_not_before, [ 6] = x509_note_params, - [ 7] = x509_note_pkey_algo, - [ 8] = x509_note_serial, + [ 7] = x509_note_serial, + [ 8] = x509_note_sig_algo, [ 9] = x509_note_signature, [ 10] = x509_note_subject, [ 11] = x509_note_tbs_certificate, @@ -59,7 +59,7 @@ static const unsigned char x509_machine[] = { [ 12] = _tag(UNIV, CONS, SEQ), [ 13] = _jump_target(74), // --> AlgorithmIdentifier [ 14] = ASN1_OP_ACT, - [ 15] = _action(ACT_x509_note_pkey_algo), + [ 15] = _action(ACT_x509_note_sig_algo), // Name [ 16] = ASN1_OP_MATCH_JUMP, [ 17] = _tag(UNIV, CONS, SEQ), diff --git a/backport/compat/verification/x509.asn1.h b/backport/compat/verification/x509.asn1.h index 77ec6085ae75..10648630ade4 100644 --- a/backport/compat/verification/x509.asn1.h +++ b/backport/compat/verification/x509.asn1.h @@ -14,8 +14,8 @@ extern int x509_note_issuer(void *, size_t, unsigned char, const void *, size_t) extern int x509_note_not_after(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_not_before(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_params(void *, size_t, unsigned char, const void *, size_t); -extern int x509_note_pkey_algo(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_serial(void *, size_t, unsigned char, const void *, size_t); +extern int x509_note_sig_algo(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_signature(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_subject(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_tbs_certificate(void *, size_t, unsigned char, const void *, size_t); From patchwork Tue Oct 11 21:04:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004368 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB72DC43219 for ; Tue, 11 Oct 2022 21:05:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229682AbiJKVFX (ORCPT ); Tue, 11 Oct 2022 17:05:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbiJKVFB (ORCPT ); Tue, 11 Oct 2022 17:05:01 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AF091115D for ; Tue, 11 Oct 2022 14:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=483S3Mein09j025eo47LvSrvxY1ZTEgSO7oCla71R0w=; t=1665522296; x=1666731896; b=P2VimHC0C2vNbwvn0z4B1zcBakqYNyvthxpx1HJ0HMLAFyf c7IY/KdP+DGboJoXhCQfqGozD6cDdSGFIt/MqlZPLaR6BQU5po5lMnLbgTnipVAMUht7b0MFadoIL 3T1NqQyXjb7Ll62JcNb3gQwTIAQ2fwytB9KgxZ7m7jYHQCPS3eC7SioUkUAocJq5b4XNLiemWlZ5g CZsqlnx2FHes78d0SYaeMd8df5oXVHgzKSrvGomlWX3q5AoX5y/Ai+cuzSbHLDeWOlYj2WAxa0V7n BKAoQkGYzBwoR0xIPgf+jPUfVd3CpQul1zy0MjZwaC8U+QwMKVfWBz4vbw9xBvwg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQo-0045LP-0H; Tue, 11 Oct 2022 23:04:54 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Gregory Greenman Subject: [PATCH 19/38] backports: update mac80211-status.patch to v6.0-rc1 Date: Tue, 11 Oct 2022 23:04:27 +0200 Message-Id: <20221011230356.b683e2145eab.Ibfa4e1ca7cb70dcc4c687b543e379b40343de1ef@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Gregory Greenman Update for some changes in struct ieee80211_tx_status. Signed-off-by: Gregory Greenman --- patches/0097-skb-list/mac80211-status.patch | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/patches/0097-skb-list/mac80211-status.patch b/patches/0097-skb-list/mac80211-status.patch index 04d1a6af9457..7edff7f7ede4 100644 --- a/patches/0097-skb-list/mac80211-status.patch +++ b/patches/0097-skb-list/mac80211-status.patch @@ -5,12 +5,14 @@ support bulk free") makes use of the list attribute in the skb, but this is not available in kernel < 4.19, use the sk_buff_head instead on these kernel versions. +diff --git a/include/net/mac80211.h b/include/net/mac80211.h +index 47642b020706..1abda970a6e6 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1137,7 +1137,11 @@ struct ieee80211_tx_status { - struct ieee80211_tx_info *info; - struct sk_buff *skb; - struct rate_info *rate; +@@ -1178,7 +1178,11 @@ struct ieee80211_tx_status { + struct ieee80211_rate_status *rates; + u8 n_rates; + +#if LINUX_VERSION_IS_GEQ(4,19,0) struct list_head *free_list; +#else @@ -19,9 +21,11 @@ kernel versions. }; /** +diff --git a/net/mac80211/status.c b/net/mac80211/status.c +index e69272139437..549d50aac4b0 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c -@@ -1060,7 +1060,11 @@ static void __ieee80211_tx_status(struct +@@ -1075,7 +1075,11 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw, */ if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) { if (status->free_list) @@ -33,7 +37,7 @@ kernel versions. else dev_kfree_skb(skb); return; -@@ -1210,7 +1214,11 @@ free: +@@ -1228,7 +1232,11 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, ieee80211_report_used_skb(local, skb, false); if (status->free_list) From patchwork Tue Oct 11 21:04:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004357 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E995C43219 for ; Tue, 11 Oct 2022 21:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbiJKVFO (ORCPT ); Tue, 11 Oct 2022 17:05:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbiJKVFB (ORCPT ); Tue, 11 Oct 2022 17:05:01 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E92C91F616 for ; Tue, 11 Oct 2022 14:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Q+AQGgOcVsix3qIYjxcO2OgBd1qGCanSFDyW6du5MX8=; t=1665522297; x=1666731897; b=Ar+oNlyvy/v4WLxHHK6iMe7v4h4RFGPbmnKAc1EfO+5Fa5R SH27uc374BfEU9h8ro1u//0caHKtaTNRwhFLCOxVBB/XLAviK1b5dB32YC4zqtizL1TkGmcXKoXjm cG3sP4X8CNyMrGAIzdzK/hMchuGjlBSR5KisQ9OsbkpkuvKu/UTof6r4iuAgaeswCKaNf8uM3f1F7 G/PfzTGyx+b0DcSnQptJWvCNsTBvUEsGbeo7htahb8hQ+3P0ibfUvJtschUT+m3vr30mdq250PvUT rO3RmpZd7tOx1hEUGZRHj2qiKiDlGsy/UOEsUo14nrdWsIQjCP03kBvYidvOYdEQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQo-0045LP-1I; Tue, 11 Oct 2022 23:04:54 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 20/38] backports: add linux/efi.h Date: Tue, 11 Oct 2022 23:04:28 +0200 Message-Id: <20221011230356.a2efbf35f5db.Ib2c8a1b389e6a5b212332e9cda7b0adb369738a5@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg We need efi_rt_services_supported() on older kernels now. Signed-off-by: Johannes Berg --- backport/backport-include/linux/efi.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/efi.h diff --git a/backport/backport-include/linux/efi.h b/backport/backport-include/linux/efi.h new file mode 100644 index 000000000000..c2ac9dd97947 --- /dev/null +++ b/backport/backport-include/linux/efi.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2022 Intel Corporation + */ +#ifndef __BACKPORT_LINUX_EFI_H +#define __BACKPORT_LINUX_EFI_H +#include_next + +#ifndef EFI_RT_SUPPORTED_GET_VARIABLE +#define efi_rt_services_supported(...) efi_enabled(EFI_RUNTIME_SERVICES) +#endif + +#endif /* __BACKPORT_LINUX_EFI_H */ From patchwork Tue Oct 11 21:04:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004359 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C744BC433FE for ; Tue, 11 Oct 2022 21:05:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbiJKVFQ (ORCPT ); Tue, 11 Oct 2022 17:05:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbiJKVFB (ORCPT ); Tue, 11 Oct 2022 17:05:01 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E930C20184 for ; Tue, 11 Oct 2022 14:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=4WSUQMOB2sB9mh61yW1Bj3hqV9V5TTtO//utFohF4Z8=; t=1665522297; x=1666731897; b=JZJ1mT1PQNFNHBchZvQzWvFUAQMl1B3/Z4wE4zcZJcwtfqN 6+gLFpt2U5lk4AyXIsQIzPVvDe5X+olNlYt29ZmI8FHbVa4BaYfiM7tVUJBDrbgVJICLw8snNgmln Do7NaDA5CmsDKWON6Hb7u9hsGw1eQEUNNCrPnBq1wI1gi6vAOtWM5kNB/BZTQfG7i48g1XwyB4JB5 OAf808qkzH1VQIBAGr/gbyo0UN/dCQOmYPim2NAqys3H0g3Ed76Fnq67Yb5KrYBEHLj+V6A5zGPno k9p7dBikyk8mo5BaWgrc612xYNxbd1HQvxOmLzQ7r6/b4Pt2pmoapwiq0oIcryAQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQo-0045LP-2B; Tue, 11 Oct 2022 23:04:54 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 21/38] backports: add eth_hw_addr_set() Date: Tue, 11 Oct 2022 23:04:29 +0200 Message-Id: <20221011230356.8f08adab3cba.I04584880e09adbe7318583f88d24358005f95ccf@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/etherdevice.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/backport/backport-include/linux/etherdevice.h b/backport/backport-include/linux/etherdevice.h index 55672f69ddaa..f6fa51f3829c 100644 --- a/backport/backport-include/linux/etherdevice.h +++ b/backport/backport-include/linux/etherdevice.h @@ -38,4 +38,18 @@ static inline void u64_to_ether_addr(u64 u, u8 *addr) } #endif /* LINUX_VERSION_IS_LESS(4,11,0) */ +#if LINUX_VERSION_IS_LESS(5,15,0) +/** + * eth_hw_addr_set - Assign Ethernet address to a net_device + * @dev: pointer to net_device structure + * @addr: address to assign + * + * Assign given address to the net_device, addr_assign_type is not changed. + */ +static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr) +{ + ether_addr_copy(dev->dev_addr, addr); +} +#endif /* LINUX_VERSION_IS_LESS(5,15,0) */ + #endif /* _BACKPORT_LINUX_ETHERDEVICE_H */ From patchwork Tue Oct 11 21:04:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 788E1C4321E for ; Tue, 11 Oct 2022 21:05:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbiJKVFY (ORCPT ); Tue, 11 Oct 2022 17:05:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbiJKVFB (ORCPT ); Tue, 11 Oct 2022 17:05:01 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C19228E20 for ; Tue, 11 Oct 2022 14:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=ug/pkXvdSrGiDEUP1E/SuE/0uSHKuABkjYQXrkZXdak=; t=1665522297; x=1666731897; b=OPKANp8GtwiaU7246KBgubH1yzlrsAtgcyARLYiIoFYsEAO +yDZSe9rLygP22WNTWTaKwbzpUA+DqNumj7tWJful08OZ5GqER6Mh/0YgHTiinZEqNwNw1V4KU/2J 0z7Qn0xD4vu/eQlkRWws5ZVUWkWH9hCDU8mKkDRNCFzglT6lS6V4wIDQYm/Ngjy6R37AkzcpVm1OJ gXXXjkuza/CtZNeWWcxQS6rsb7BAYSt4zJlDG4S1OIYCEjSDXRuiysturiKuSXU5Mfv5+gWg6o/VX ucJqHF6J08TbeHmPi9/5uDNGr+ne3ha/3BaezcnmNz+d5oWa0j62piD81Y+LY1zw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQo-0045LP-39; Tue, 11 Oct 2022 23:04:55 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 22/38] backports: add module namespace support Date: Tue, 11 Oct 2022 23:04:30 +0200 Message-Id: <20221011230356.7685cc3373dc.Id7fdad79d5130d44fe2e2bf5ea64ab10ec9f0022@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Add EXPORT_SYMBOL_NS_GPL() and MODULE_IMPORT_NS(), for kernels that don't yet know about it. Just do nothing about namespaces in that case, of course. Signed-off-by: Johannes Berg --- backport/backport-include/linux/export.h | 12 ++++++++++++ backport/backport-include/linux/module.h | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 backport/backport-include/linux/export.h diff --git a/backport/backport-include/linux/export.h b/backport/backport-include/linux/export.h new file mode 100644 index 000000000000..c24c9f99c78b --- /dev/null +++ b/backport/backport-include/linux/export.h @@ -0,0 +1,12 @@ +#ifndef _COMPAT_LINUX_EXPORT_H +#define _COMPAT_LINUX_EXPORT_H 1 + +#include + +#include_next + +#ifndef EXPORT_SYMBOL_NS_GPL +#define EXPORT_SYMBOL_NS_GPL(sym, ns) EXPORT_SYMBOL_GPL(sym) +#endif + +#endif /* _COMPAT_LINUX_EXPORT_H */ diff --git a/backport/backport-include/linux/module.h b/backport/backport-include/linux/module.h index efe970f174ed..b93a56d97611 100644 --- a/backport/backport-include/linux/module.h +++ b/backport/backport-include/linux/module.h @@ -67,4 +67,8 @@ extern void backport_dependency_symbol(void); __CFI_ADDRESSABLE(cleanup_module, __exitdata); #endif +#if LINUX_VERSION_IS_LESS(5,4,0) +#define MODULE_IMPORT_NS(ns) +#endif + #endif /* __BACKPORT_LINUX_MODULE_H */ From patchwork Tue Oct 11 21:04:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004370 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C77FEC43217 for ; Tue, 11 Oct 2022 21:05:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbiJKVFZ (ORCPT ); Tue, 11 Oct 2022 17:05:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbiJKVFB (ORCPT ); Tue, 11 Oct 2022 17:05:01 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF89F2A408 for ; Tue, 11 Oct 2022 14:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+spowWmJGP7Tb6jler2ZD0aHFj4mTyVoxPCkn70LkN0=; t=1665522297; x=1666731897; b=EimImU8kRlGCyN0Bxumv3DRj7BD59kdejnkBmRIZc0GNhCe e3kXJ87lw92UvFI+ClBrkRm6RjjJqTyjOrgJOz6ZhVAZTYtkLBW78reXspS0h/dwsTjcQq8I6Aq7J rh67C9f9NuVwOTiVjtSq3LczckVQGm17x2bVUkk7a83J5lO036+WqRl7eKguPcTMUhGONLnORHcZJ 7MJHUoavxAxXY62SFC7drAigZllloQ0DH/pjS5RZqSOUmILQQinvcmm7aeJlrgMI+Z8uR2UgkcgKQ WN1+q2FD/lX+zuA8L0NdRJ0RxCvfS8oZGyQ/jIx3o9PtI/nZsTEj6WyWEDm55lSw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQp-0045LP-0n; Tue, 11 Oct 2022 23:04:55 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 23/38] backports: add lockdep_is_held() when needed Date: Tue, 11 Oct 2022 23:04:31 +0200 Message-Id: <20221011230356.d88d290ba089.I013e3ab4f0cfe836d7ff96ae3d68508e55987333@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg If lockdep is not enabled and lockdep_is_held() not already defined as a macro, declare it as an inline just like upstream does now. Signed-off-by: Johannes Berg --- backport/backport-include/linux/lockdep.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/lockdep.h b/backport/backport-include/linux/lockdep.h index 842e24b7ff8f..8295b0d49184 100644 --- a/backport/backport-include/linux/lockdep.h +++ b/backport/backport-include/linux/lockdep.h @@ -9,6 +9,13 @@ struct lockdep_map { }; #endif /* CONFIG_LOCKDEP */ #endif /* LINUX_VERSION_IS_LESS(4,15,0) */ +#if LINUX_VERSION_IS_LESS(5,11,0) +#if !defined(CONFIG_LOCKDEP) && !defined(lockdep_is_held) +/* upstream since 5.11 in this exact same way - calls compile away */ +int lockdep_is_held(const void *); +#endif +#endif + #ifndef lockdep_assert_not_held #ifdef CONFIG_LOCKDEP #ifndef LOCK_STATE_HELD From patchwork Tue Oct 11 21:04:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12123C4321E for ; Tue, 11 Oct 2022 21:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229590AbiJKVFT (ORCPT ); Tue, 11 Oct 2022 17:05:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2AB521247 for ; Tue, 11 Oct 2022 14:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=nl+S5eYJqyWINBGeW1Z1FXUCq3j5VXrV4euMMEg9dhk=; t=1665522299; x=1666731899; b=wbXbs+NO+g/h4TDslVleEqIPAzoNe7/pV5JklL250CMOpGs 18ckUO8RwDrj25RbZry0m/LcZwuMZzG+l6wre8imbsLXlpco9hNsFxKbACyTQvnoweuUVclot4Jxn uzhucLyMwgXzWjtrqo5KZldKg68Ky3i/FKVDsD/sR7cZ3/1+93Aq8YqfpYjrsYJddNMHUz497UU7p 92jTnQR6Sr8gcUK00T4boqo++p1qU2Fx1dbbGhvDju0cw8A0ZFPt3X6U9CaPN2VjeI8HC+3Et7tOG +9A2MzVS9aiQRL9DYpWT4xKbl+FvU2NPQuGoEovbNZZZ4552kMFvShzGCdFzaFrA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQp-0045LP-1h; Tue, 11 Oct 2022 23:04:55 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 24/38] backports: add netif_rx() Date: Tue, 11 Oct 2022 23:04:32 +0200 Message-Id: <20221011230356.fb36659a480f.I4b1f5287579f615582a608782b8513f2f5cb374c@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This got changed upstream to detect the context to get rid of netif_rx_ni(), so just copy the new upstream version with the detection. Signed-off-by: Johannes Berg --- backport/backport-include/linux/netdevice.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index d2e175243560..9b3291bb7188 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -254,4 +254,21 @@ struct net_device_path_ctx { }; #endif /* NET_DEVICE_PATH_STACK_MAX */ +#if LINUX_VERSION_IS_LESS(5,18,0) +static inline int LINUX_BACKPORT(netif_rx)(struct sk_buff *skb) +{ + bool need_bh_off = !(hardirq_count() | softirq_count()); + int ret; + + if (need_bh_off) + local_bh_disable(); + ret = netif_rx(skb); + if (need_bh_off) + local_bh_enable(); + + return ret; +} +#define netif_rx LINUX_BACKPORT(netif_rx) +#endif /* < 5.18.0 */ + #endif /* __BACKPORT_NETDEVICE_H */ From patchwork Tue Oct 11 21:04:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45001C43219 for ; Tue, 11 Oct 2022 21:05:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbiJKVFR (ORCPT ); Tue, 11 Oct 2022 17:05:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbiJKVFB (ORCPT ); Tue, 11 Oct 2022 17:05:01 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A66D032A9E for ; Tue, 11 Oct 2022 14:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=1qm4Q4hZsIKhC+waxw1XWpA1i96j+fFCAz6bLQpvues=; t=1665522298; x=1666731898; b=dgM+g7CdB9gyFLyn3rkXLI9hZDXJVhqL1QWd/3GQgWqUnxm fgnxHKhoVGqLAox8SwuKHeVM+Xxng5zk0RMforVimUVBkH28S2UotnHSrUOuflWPp9/6VSZVZ1cpj VjnCh9v0RH2cRZh1Fhxd2q6h4nKrul8VvJMGUelCMl+PfbIWZHcka0gVju+DdDU3hDJwFytfiE9ph 1KJBQKB7KgS//2Ko5M/qgLOnz1JASTMrIhLeohXVh7yO4yRAtacNpiI6KrcEJE1xQ7Bp2hRuvl4e4 ShZ7SA+9onj35PVBaqum3fSvpTc2/muzHpaJYsOUGFS9fwD19Wb7O8cdscUdWesQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQp-0045LP-2g; Tue, 11 Oct 2022 23:04:55 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 25/38] backports: add rfkill_soft_blocked() Date: Tue, 11 Oct 2022 23:04:33 +0200 Message-Id: <20221011230356.878fe3b6f86d.Icd550ec514b6d1c90cb113b564c3897aab987d00@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/rfkill.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backport/backport-include/linux/rfkill.h b/backport/backport-include/linux/rfkill.h index c0b99d58f9c0..d130c9b70c47 100644 --- a/backport/backport-include/linux/rfkill.h +++ b/backport/backport-include/linux/rfkill.h @@ -21,4 +21,13 @@ static inline bool rfkill_set_hw_state_reason(struct rfkill *rfkill, #endif /* 5.11 */ +#if LINUX_VERSION_IS_LESS(5,17,0) && !defined(CONFIG_WLAN_VENDOR_INTEL_MEI) + +static inline bool rfkill_soft_blocked(struct rfkill *rfkill) +{ + return rfkill_blocked(rfkill); +} + +#endif /* 5.17 */ + #endif /* __BACKPORT_UAPI__RFKILL_H */ From patchwork Tue Oct 11 21:04:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004362 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 576ECC433FE for ; Tue, 11 Oct 2022 21:05:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229678AbiJKVFT (ORCPT ); Tue, 11 Oct 2022 17:05:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbiJKVFB (ORCPT ); Tue, 11 Oct 2022 17:05:01 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A681B32B94 for ; Tue, 11 Oct 2022 14:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=mo6diquA8xcfcBVUmpdy7XLkyER8j5p1rjYnAj82o/o=; t=1665522298; x=1666731898; b=P8bdGi5rIkzf3dS2qzfx+W6o9X4+vxjpj6iKteIit1xvH8J KiPykSzBexUgAzBgK09SnDeBnv1x81b622V4YF3tCI5jPbp4f4S4Rt6iE/mqrN5v8uHCmsYfRhxyO F2/qMUhLiZDRQWR6yOxzcMcQrnYsuPuHgjhTlA0vLPMW3nRyZh3y9EGbg78nYCAFybw11hF3NyeB8 JSfBrdrkdS5RR6WalnZU2OO7k+JIWJLmfucOXavr8BJT0GSO2H4svfwvvwIyq8rAagHzhYZzdyCb9 LroMp8nNMueFlyIwFdyNHcPB6cXaZ3sgR7tSzG/NKxO2uf+ef79EEd4EzBjdTgpg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQq-0045LP-0F; Tue, 11 Oct 2022 23:04:56 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 26/38] backports: add skb_postpush_rcsum() Date: Tue, 11 Oct 2022 23:04:34 +0200 Message-Id: <20221011230356.a46baa44bd00.Iac7dddba17673fed03773ee928383cdf59718f5f@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index c5015e9def24..79cff7afd73a 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -4,6 +4,23 @@ #include +#if LINUX_VERSION_IS_LESS(4,4,10) +static __always_inline void +__skb_postpush_rcsum(struct sk_buff *skb, const void *start, unsigned int len, + unsigned int off) +{ + if (skb->ip_summed == CHECKSUM_COMPLETE) + skb->csum = csum_block_add(skb->csum, + csum_partial(start, len, 0), off); +} + +static inline void skb_postpush_rcsum(struct sk_buff *skb, + const void *start, unsigned int len) +{ + __skb_postpush_rcsum(skb, start, len, 0); +} +#endif /* LINUX_VERSION_IS_LESS(4,4,10) */ + #if LINUX_VERSION_IS_LESS(4,13,0) static inline void *backport_skb_put(struct sk_buff *skb, unsigned int len) { From patchwork Tue Oct 11 21:04:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004360 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 022BAC4332F for ; Tue, 11 Oct 2022 21:05:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbiJKVFR (ORCPT ); Tue, 11 Oct 2022 17:05:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C83633362 for ; Tue, 11 Oct 2022 14:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=3LH2ZhFqiCbhKAI4rzfUcE6yjIBBp1kR8qSrkW96hYc=; t=1665522299; x=1666731899; b=rdNcx/GU8vq8PnvsmstUeGbN7PpxmMhAQmwkLPj+T6UZngQ TazaytnI0vSnvHwJ7VvQyML8kcmEq+PdD7qRarcE6CKJzGEfVubHopiS6VJs1LPQ40SnRxivr766C lj1pbl7iGQM4nNDpmmO+ZgNpJfkIw5nDScMf/bn9dGIX4CR9mpvEPS53KcIuPN7bTkN/FcgjHv/SI Wd39CnRxfgYCO5iigmPzvvYhsK9Dy4DT/bU82wiXoB8SJifklmCGpEgrUWDgA/Z4Lkw9SxCNoLk8Y O3Vin+q2BX4I0mj2jJqBiC0IyIaBSqVznLRxu/DS51VwsLqWY/De2z3eBTrMIYlg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQq-0045LP-1W; Tue, 11 Oct 2022 23:04:56 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 27/38] backports: add skb_list_del_init() Date: Tue, 11 Oct 2022 23:04:35 +0200 Message-Id: <20221011230356.d6110fa27c22.I5a46230bc9c575b716597267e0b7b455600e05b6@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This got backported to 4.19.10, but we use it for >= 4.19.0, so provide a backported version for < 4.19.10. Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 79cff7afd73a..fc99b5bb7513 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -85,8 +85,16 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) { skb->next = NULL; } +#endif /* 4.19.10 <= x < 4.20 || 4.14.217 <= x < 4.15 */ + +#if !LINUX_VERSION_IN_RANGE(4,19,10, 4,20,0) +static inline void skb_list_del_init(struct sk_buff *skb) +{ + __list_del_entry((struct list_head *)&skb->next); + skb_mark_not_on_list(skb); +} #endif /* 4.19.10 <= x < 4.20 */ -#endif +#endif /* < 4.20 */ #if LINUX_VERSION_IS_LESS(4,11,0) #define skb_mac_offset LINUX_BACKPORT(skb_mac_offset) From patchwork Tue Oct 11 21:04:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004366 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66778C43217 for ; Tue, 11 Oct 2022 21:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229501AbiJKVFV (ORCPT ); Tue, 11 Oct 2022 17:05:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAE60356EA for ; Tue, 11 Oct 2022 14:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=jqtlIJu3rlSxP1Ctg8AsmOPy1o0PYC43Mz/v8BWfJ6Q=; t=1665522299; x=1666731899; b=XanfZAsVb1zD3pnmFz5+L+BxD5t2yZ1kNgVk48No2kzp3an p9pl6QJX6tu/6dTtq9ToWL0FEUz+qc6meWC26UofkrYGS7T4kOqT9RJbh+akQczqmQfVMzfZ2EWWf pdnA/KLBN0bhLzofYQcXW+Ek4HGV5Aak0b/YXJoynGghess/cf0jDLjdTR33Y4nLQ15MQRnIxAUGv zxp9sAnQJf7X4xYAFIuhE3eKAyJ4hMRJVxJ2AXoGAMPLFr2Yuu1uvBG4dSGLTy69sBIqWjYodkiqf RhxWspdKviAkiK9g+fM7LXi2mmEBNdB28gWKwhyZs2YHt6wkASEv3v7wJnXJXGyQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQq-0045LP-30; Tue, 11 Oct 2022 23:04:57 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 28/38] backports: update skb kcov ifdef Date: Tue, 11 Oct 2022 23:04:36 +0200 Message-Id: <20221011230356.dfc7c2811ea7.I96fb26c6080e6f75909fafab5de38ccd255ff6f2@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This got backported to 5.10.54 so need to update the ifdef. Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index fc99b5bb7513..376dd5942a34 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -148,7 +148,7 @@ static inline __u32 skb_queue_len_lockless(const struct sk_buff_head *list_) } #endif /* < 5.6.0 */ -#if LINUX_VERSION_IS_LESS(5,11,0) +#if LINUX_VERSION_IS_LESS(5,10,54) #define skb_get_kcov_handle LINUX_BACKPORT(skb_get_kcov_handle) static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { From patchwork Tue Oct 11 21:04:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004364 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70002C4332F for ; Tue, 11 Oct 2022 21:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbiJKVFU (ORCPT ); Tue, 11 Oct 2022 17:05:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BADE9356CA for ; Tue, 11 Oct 2022 14:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=umEFBdqdnJzsRgQYyjlVTNMtvITfREgUQGjkqojkPc8=; t=1665522299; x=1666731899; b=cyXRm/etshNYL2sKTN6mNJUTXTfvz/4/8kvtkaZovvNMZAH YVJ8lVxpHWskxCAQm7Jvebrcw4HmxuFM392CRHcBBhxfK7fGgzq71Ge1ySC/LEaoKokRBnRrMXzH9 6zmX9csXxp5M44wSmb3/SaUaInM2/n8wxGP5WLpwaRkzZzP+So7pemTAceG9TrgXpMztqLtzNuhRk PJP5HdyV9k7vw2yhkqe9HA7nBHlQQVgDGRqgGtcBFTG9bDfvcJFqC46us2rHdTjfXjhxigaeNL84w hkXivFtbYh83laGwx6MAdIm0WG1kqYyr6wP3QHT4G6ZYzJlSS9U5PSTNWMXEULJQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQr-0045LP-0i; Tue, 11 Oct 2022 23:04:57 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 29/38] backports: add DECLARE_FLEX_ARRAY() Date: Tue, 11 Oct 2022 23:04:37 +0200 Message-Id: <20221011230356.1a1a6ae0dace.I5042a985a702b7a8b4dcb4116997b2a53749f6ca@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/stddef.h | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/backport/backport-include/linux/stddef.h b/backport/backport-include/linux/stddef.h index a6cdc67d2727..54afbd556467 100644 --- a/backport/backport-include/linux/stddef.h +++ b/backport/backport-include/linux/stddef.h @@ -23,4 +23,35 @@ (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER)) #endif +#ifndef DECLARE_FLEX_ARRAY +/** + * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union + * + * @TYPE: The type of each flexible array element + * @NAME: The name of the flexible array member + * + * In order to have a flexible array member in a union or alone in a + * struct, it needs to be wrapped in an anonymous struct with at least 1 + * named member, but that member can be empty. ++ */ +#define __DECLARE_FLEX_ARRAY(TYPE, NAME) \ + struct { \ + struct { } __empty_ ## NAME; \ + TYPE NAME[]; \ + } + +/** + * DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union + * + * @TYPE: The type of each flexible array element + * @NAME: The name of the flexible array member + * + * In order to have a flexible array member in a union or alone in a + * struct, it needs to be wrapped in an anonymous struct with at least 1 + * named member, but that member can be empty. + */ +#define DECLARE_FLEX_ARRAY(TYPE, NAME) \ + __DECLARE_FLEX_ARRAY(TYPE, NAME) +#endif + #endif /* __BACKPORT_LINUX_STDDEF_H */ From patchwork Tue Oct 11 21:04:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE6ABC4167B for ; Tue, 11 Oct 2022 21:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbiJKVFW (ORCPT ); Tue, 11 Oct 2022 17:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38B853740F for ; Tue, 11 Oct 2022 14:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=dxhBacGFjnThP4LxViiGxu7iX4xCXXVv+rDNXG+DUdk=; t=1665522300; x=1666731900; b=Jt/bfWVTqDI+q3rZcrt7MvhaGdgrlICn+GhpkSYK8lUpH2J iO/XvZ6iocsjFIm5lqg219MwdiooxE4UBUd+k8b5ZjF/ttiEUnzrnWwtCXI7atjGFyV/RMpcmgODm +g2HffjwbShShjUTqvWFygqTYI1SLb7RAv4QPj8JALSQvJwdswxTi0BYSWs0kBZnDWErBLOKiybZ7 j3GVPYQkcrWaSOIWTZnJ7EKBjbS8flUCelYmzqPAi/SBM25mubtxlMkqUxulutWECPIcFErsUux/J hLotDxEDXNIeSc0bSV9gNvur/s01LRhZWBhGUwS+8FmdylEuB44xgrDN9LjEpDtQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQr-0045LP-1b; Tue, 11 Oct 2022 23:04:57 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 30/38] backports: add skb_get_dsfield() Date: Tue, 11 Oct 2022 23:04:38 +0200 Message-Id: <20221011230356.d7c89bc4d67c.Ia5da0970fd85b5844c99eae51c822dbe1e4ec81c@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg That may also require skb_protocol() and skb_vlan_tag_present() Signed-off-by: Johannes Berg --- backport/backport-include/net/inet_ecn.h | 66 ++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 backport/backport-include/net/inet_ecn.h diff --git a/backport/backport-include/net/inet_ecn.h b/backport/backport-include/net/inet_ecn.h new file mode 100644 index 000000000000..df83d3e179ec --- /dev/null +++ b/backport/backport-include/net/inet_ecn.h @@ -0,0 +1,66 @@ +#ifndef __BACKPORT_NET_INET_ECN_H +#define __BACKPORT_NET_INET_ECN_H +#include_next +#include +#include + +#ifndef skb_vlan_tag_present +#define skb_vlan_tag_present(__skb) ((__skb)->vlan_present) +#endif + +#if LINUX_VERSION_IS_LESS(5,7,10) && \ + !LINUX_VERSION_IN_RANGE(4,14,212, 4,15,0) && \ + !LINUX_VERSION_IN_RANGE(4,19,134, 4,20,0) && \ + !LINUX_VERSION_IN_RANGE(4,4,248, 4,5,0) && \ + !LINUX_VERSION_IN_RANGE(4,9,248, 4,10,0) && \ + !LINUX_VERSION_IN_RANGE(5,4,53, 5,5,0) +/* A getter for the SKB protocol field which will handle VLAN tags consistently + * whether VLAN acceleration is enabled or not. + */ +static inline __be16 skb_protocol(const struct sk_buff *skb, bool skip_vlan) +{ + unsigned int offset = skb_mac_offset(skb) + sizeof(struct ethhdr); + __be16 proto = skb->protocol; + + if (!skip_vlan) + /* VLAN acceleration strips the VLAN header from the skb and + * moves it to skb->vlan_proto + */ + return skb_vlan_tag_present(skb) ? skb->vlan_proto : proto; + + while (eth_type_vlan(proto)) { + struct vlan_hdr vhdr, *vh; + + vh = skb_header_pointer(skb, offset, sizeof(vhdr), &vhdr); + if (!vh) + break; + + proto = vh->h_vlan_encapsulated_proto; + offset += sizeof(vhdr); + } + + return proto; +} +#endif + +#if LINUX_VERSION_IS_LESS(5,16,0) +#define skb_get_dsfield LINUX_BACKPORT(skb_get_dsfield) +static inline int skb_get_dsfield(struct sk_buff *skb) +{ + switch (skb_protocol(skb, true)) { + case cpu_to_be16(ETH_P_IP): + if (!pskb_network_may_pull(skb, sizeof(struct iphdr))) + break; + return ipv4_get_dsfield(ip_hdr(skb)); + + case cpu_to_be16(ETH_P_IPV6): + if (!pskb_network_may_pull(skb, sizeof(struct ipv6hdr))) + break; + return ipv6_get_dsfield(ipv6_hdr(skb)); + } + + return -1; +} +#endif + +#endif /* __BACKPORT_NET_INET_ECN_H */ From patchwork Tue Oct 11 21:04:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004365 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E37EEC43219 for ; Tue, 11 Oct 2022 21:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiJKVFV (ORCPT ); Tue, 11 Oct 2022 17:05:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38B46371B9 for ; Tue, 11 Oct 2022 14:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=r54dB7yH7/Alfgl6fWoSgD9hH2jKMeU+KlnossxwTXk=; t=1665522300; x=1666731900; b=wOKILsT+kEEVPMIBFkufsrV7+9reEB2DID243vzPgYQR7T/ GfePkoY1qSbbuPmch+Yz9T+H7ESFWWQwK4IVchTvLfQsf6+c6dG4lCVu8782uW7Fiy3BPk2/pXuh4 qNAC+8rj/2v1IWwLHme4+6cM/g373xfh62w7Bi7t+gZ+wpmnkUBPFSFsr8OdV8JviNA5d4WnPO93t zfeutG+sWcZsM9iNZbDLBzqSe7uHktsIBuIAkEzV18wmy6yigCP9DTxtUXuHT/0m768nk8BGOLZCD 4+aRQ6ns9P45VnVWBcEb4yZxtyMntcyM6+VgRcBUXwdqUXNqgwSwHPBbIAhwx3yw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQr-0045LP-2g; Tue, 11 Oct 2022 23:04:57 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 31/38] backports: add NLA_POLICY_MIN_LEN() Date: Tue, 11 Oct 2022 23:04:39 +0200 Message-Id: <20221011230356.9bce661edbc9.I7e4b8c603be22ac6eee54cbc7b229d3b630f8498@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/net/netlink.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index e94f32626782..e78a0ff7971c 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -264,6 +264,8 @@ nla_validate_nested_deprecated(const struct nlattr *start, int maxtype, return __nla_validate_nested(start, maxtype, policy, NL_VALIDATE_LIBERAL, extack); } + +#define NLA_POLICY_MIN_LEN(_len) { .type = NLA_MIN_LEN, .len = _len } #endif /* < 5.2 */ #if LINUX_VERSION_IS_LESS(5,6,0) From patchwork Tue Oct 11 21:04:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCB07C433FE for ; Tue, 11 Oct 2022 21:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229577AbiJKVFW (ORCPT ); Tue, 11 Oct 2022 17:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbiJKVFC (ORCPT ); Tue, 11 Oct 2022 17:05:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0C23C8C6 for ; Tue, 11 Oct 2022 14:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=BY7llortZjgCGmz7Lx3REkFiY29q3jdcrgQAJ0JJEmk=; t=1665522300; x=1666731900; b=ihBvSmdkqSQN7cJMUcDFRvd22/iasFpeYWmlUeNX2G4bUHa ZFoeKXyVZkBJiuUcvsidgttMn8rQz0xwj0qsFaZlWmoyjzPZ3wiRitans5t/f3DPuLledklZmCv59 WwXV9mWNhJt6Fn57xmK+UMXIWds+V0yl6fSOW4equVN0re/c/7tCt0l0NOP8VBulBTr5F5a2QUkHy XbQXdg9jPFZ6wXI/ESCWqONRBHYNM+g2iGBY1qu2Idjzxrbf68iMugBm3GFf7tc9YcLgOl6QQEiVO I7zFSvHSkPpbuW/PF9vkjpkiAKpHV7lox/RGdIIzFFKEddotJv9Qyu68JjT7YmOg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQs-0045LP-0O; Tue, 11 Oct 2022 23:04:58 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 32/38] backports: add netlink length validation for 13 Date: Tue, 11 Oct 2022 23:04:40 +0200 Message-Id: <20221011230356.b644475cebaf.Ie5f51a2a3b67734956f49ea9c1e1091f60400cdf@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This is needed for EHT. Signed-off-by: Johannes Berg --- backport/backport-include/net/netlink.h | 1 + 1 file changed, 1 insertion(+) diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index e78a0ff7971c..0de0de5ff8ad 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -561,6 +561,7 @@ int nla_validate_min_len_##n(const struct nlattr *attr, \ } MIN_LEN_VALIDATION(2) +MIN_LEN_VALIDATION(13) MIN_LEN_VALIDATION(16) MIN_LEN_VALIDATION(42) From patchwork Tue Oct 11 21:04:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004374 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFB39C433FE for ; Tue, 11 Oct 2022 21:05:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbiJKVF0 (ORCPT ); Tue, 11 Oct 2022 17:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbiJKVFF (ORCPT ); Tue, 11 Oct 2022 17:05:05 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7880622B2E for ; Tue, 11 Oct 2022 14:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=WwwT8zETysXbIfEYDkOsyYMEKL5s092bPivdy2F8Sf8=; t=1665522301; x=1666731901; b=gTrqSfnkkMjYcw8JnUBC9JqmIh/Yv9NlYMREwOOO4YNBuEy z1+rwjdwSZcFr0H6c8IrAz9uv3AXqdxnAAupy4VcGmlUOiISz56Zc+6DRvQyDSRfdSpHm/QjO46cV V6RJOXkrcnEErLJFBlWzvjjoTh7kjGJtDTYdoXGwLPeiuPWYjTEWjA67DX9QRHS0+WK8/kp/anRoT 5cX6Qwk2/5m6KyauEFAXI4mkymO5G7+trVSS2W8I2M7KoOQbR8qjYrMSYlJoHnVZPVqe9CiK6iR8v ouW2uyio+GpnB1KhmgaewLzx9KvpzWjF4xoQs5nykQrRO09/GV0e46ncZLvBVG1A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQs-0045LP-1n; Tue, 11 Oct 2022 23:04:58 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 33/38] backports: add mul_u64_u64_div_u64() Date: Tue, 11 Oct 2022 23:04:41 +0200 Message-Id: <20221011230356.8a84958f6acb.Ia106b487910574e59b56065f04f9448655011b0a@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/math64.h | 11 ++++++ backport/compat/Makefile | 1 + backport/compat/backport-5.9.c | 45 ++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 backport/backport-include/linux/math64.h create mode 100644 backport/compat/backport-5.9.c diff --git a/backport/backport-include/linux/math64.h b/backport/backport-include/linux/math64.h new file mode 100644 index 000000000000..6aea9c9eec77 --- /dev/null +++ b/backport/backport-include/linux/math64.h @@ -0,0 +1,11 @@ +#ifndef __BACKPORT_LINUX_MATH64_H +#define __BACKPORT_LINUX_MATH64_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(5,9,0) +#define mul_u64_u64_div_u64 LINUX_BACKPORT(mul_u64_u64_div_u64) +extern u64 mul_u64_u64_div_u64(u64 a, u64 b, u64 c); +#endif /* < 5.9 */ + +#endif /* __BACKPORT_LINUX_MATH64_H */ diff --git a/backport/compat/Makefile b/backport/compat/Makefile index b9f1dee9ae07..c488fcdc727f 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -17,6 +17,7 @@ compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o compat-$(CPTCFG_KERNEL_5_2) += backport-5.2.o backport-genetlink.o compat-$(CPTCFG_KERNEL_5_3) += backport-5.3.o compat-$(CPTCFG_KERNEL_5_5) += backport-5.5.o +compat-$(CPTCFG_KERNEL_5_9) += backport-5.9.o compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o diff --git a/backport/compat/backport-5.9.c b/backport/compat/backport-5.9.c new file mode 100644 index 000000000000..54d1802efd31 --- /dev/null +++ b/backport/compat/backport-5.9.c @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include +#include + +u64 mul_u64_u64_div_u64(u64 a, u64 b, u64 c) +{ + u64 res = 0, div, rem; + int shift; + + /* can a * b overflow ? */ + if (ilog2(a) + ilog2(b) > 62) { + /* + * (b * a) / c is equal to + * + * (b / c) * a + + * (b % c) * a / c + * + * if nothing overflows. Can the 1st multiplication + * overflow? Yes, but we do not care: this can only + * happen if the end result can't fit in u64 anyway. + * + * So the code below does + * + * res = (b / c) * a; + * b = b % c; + */ + div = div64_u64_rem(b, c, &rem); + res = div * a; + b = rem; + + shift = ilog2(a) + ilog2(b) - 62; + if (shift > 0) { + /* drop precision */ + b >>= shift; + c >>= shift; + if (!c) + return res; + } + } + + return res + div64_u64(a * b, c); +} +EXPORT_SYMBOL_GPL(mul_u64_u64_div_u64); From patchwork Tue Oct 11 21:04:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81FEEC4167E for ; Tue, 11 Oct 2022 21:05:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbiJKVFZ (ORCPT ); Tue, 11 Oct 2022 17:05:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbiJKVFF (ORCPT ); Tue, 11 Oct 2022 17:05:05 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7874E20BD8 for ; Tue, 11 Oct 2022 14:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=RRTIOn6m3iOX+yq0CE05lkLv2Ooq50gGvj98b6ViYIE=; t=1665522301; x=1666731901; b=Eck+EESsC5W+JSO/6dyuSNVadPq54quC3kbNzFBfpC0Gb1k bq/ufLVuOYGuSGBiKO/beriy6nJemZUBHUZ5B59xBrHx44hmjF/4eLuuhvZwljAFKMKRX4VegefKa 03nbPHsIgcadetNvL5GSkK1+AJ9ddG2eO7q2k00ckzshkc8X/5QqPb0IqP704i7lUTUIRewj+hfFD yrFeCogFnwgaJsxLkpT+szLRqNsfiA1LomHPRdyGz+WXbcWxb+0DtrZWlkPQyTIHfbs9rwS0DbVDy 935GVcGIAaH7Umz63lFkO3vEO297oayhTOudaZN5CNPLTsdwyb7OF9vzj522Hg8g==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQs-0045LP-2i; Tue, 11 Oct 2022 23:04:58 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 34/38] backports: add id_2 argument to find_asymmetric_key() Date: Tue, 11 Oct 2022 23:04:42 +0200 Message-Id: <20221011230356.c5a37c34a011.I0bc338dbb6b1c91bdd54cf656ab41d09f05b8248@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/keys/asymmetric-type.h | 1 + backport/compat/verification/key.c | 1 + 2 files changed, 2 insertions(+) diff --git a/backport/backport-include/keys/asymmetric-type.h b/backport/backport-include/keys/asymmetric-type.h index 5744de9cee0f..35ddd4008c60 100644 --- a/backport/backport-include/keys/asymmetric-type.h +++ b/backport/backport-include/keys/asymmetric-type.h @@ -30,6 +30,7 @@ asymmetric_key_generate_id(const void *val_1, size_t len_1, extern struct key *find_asymmetric_key(struct key *keyring, const struct asymmetric_key_id *id_0, const struct asymmetric_key_id *id_1, + const struct asymmetric_key_id *id_2, bool partial); #endif #endif /* __BP_ASYMMETRIC_TYPE_H */ diff --git a/backport/compat/verification/key.c b/backport/compat/verification/key.c index 329f8b22e41f..f95aca4fca0e 100644 --- a/backport/compat/verification/key.c +++ b/backport/compat/verification/key.c @@ -129,6 +129,7 @@ EXPORT_SYMBOL_GPL(bp_key_create_or_update); struct key *find_asymmetric_key(struct key *keyring, const struct asymmetric_key_id *id_0, const struct asymmetric_key_id *id_1, + const struct asymmetric_key_id *id_2, bool partial) { struct key *key; From patchwork Tue Oct 11 21:04:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29422C4167D for ; Tue, 11 Oct 2022 21:05:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbiJKVFZ (ORCPT ); Tue, 11 Oct 2022 17:05:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229736AbiJKVFF (ORCPT ); Tue, 11 Oct 2022 17:05:05 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78C123BC5E for ; Tue, 11 Oct 2022 14:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=CX/MeFfjTRrBYQI+rBb829O5OUJ0QSDPKH0WmwdIaWg=; t=1665522301; x=1666731901; b=uonHuC8mRYxIFT3ILx/zTzi3HSIWQ31T6SLXgG8Kc4UywvC hHvWraRl/AxNUnJVMk3T0pAkL+XYGHOlL4ff1OiNNkji5RfUPJSmSqzeUN/JDMNf3IljfUJpGA53l 1LdtgIjSNlOsRon4X3LbLhnxSbhbdh4gZpT9TMn/YmVpGUa6hEhCTdo6xKrbP1NNDvKVcgcIi0wiQ LQnxYznvm0AcH76YlAK61HIbMNuQZnHXHlnP1qZVW6l5tSYzjMdtKk3oZ9+AycdJ7fKuzhQOWgQZP sKr+6C3vc4rh8T2lzdCFLdWNPuOgP0yD4/TZ4lVmedKU7XGUQCURv78Emzv7P19w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQt-0045LP-0V; Tue, 11 Oct 2022 23:04:59 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 35/38] backports: don't backport some SKB functions for RHEL 7.6 Date: Tue, 11 Oct 2022 23:04:43 +0200 Message-Id: <20221011230356.7f90a91853fe.Ife1d5e9e20f120283490bf771f7c71d111c4fef3@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg For RHEL 7.6 these were backported, so don't do it again. Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 376dd5942a34..419629e5d962 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -21,7 +21,8 @@ static inline void skb_postpush_rcsum(struct sk_buff *skb, } #endif /* LINUX_VERSION_IS_LESS(4,4,10) */ -#if LINUX_VERSION_IS_LESS(4,13,0) +#if LINUX_VERSION_IS_LESS(4,13,0) && \ + RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,6) static inline void *backport_skb_put(struct sk_buff *skb, unsigned int len) { return skb_put(skb, len); From patchwork Tue Oct 11 21:04:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7B67C4332F for ; Tue, 11 Oct 2022 21:05:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbiJKVF0 (ORCPT ); Tue, 11 Oct 2022 17:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbiJKVFF (ORCPT ); Tue, 11 Oct 2022 17:05:05 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78A0632ED3 for ; Tue, 11 Oct 2022 14:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=6Cq8d78YqvCqI6Wj88yaArHunkR4IpVFQipK0dRnpcY=; t=1665522301; x=1666731901; b=URLBQCgE2gsbiAWaroX5Wjv/6yD9KDYwmISJKgpUIC7g6Rt 1eyfm6wCtCTG9xqe1en2MynppwF2qLDAdjBU82dRshnQ+locswwj47yGNkWkKxImWL2nNjm/OPGFH WEKkJqyjqbl/dUeMv43hfCtyprNNmZCuA16HpjeVl1npP9VSqN+QdPBGxmJqazbpdAVVSRBt/R8vl +oNtv0nL6V+QHZc4GUMBzLsXqEZtaoUDsJTum2RVU50DYLLcEDMkyE6Dcb5lC3ORjrcIWkp8wmiUh mca61Vz7IoUFmbfmLzL5A1iZEwsVaoGfq5w0xJIPWDcBDuPEne6ikSvb8D/bXUSQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQt-0045LP-1j; Tue, 11 Oct 2022 23:04:59 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 36/38] backports: use kernel verification only if CONFIG_CRYPTO_HASH_INFO Date: Tue, 11 Oct 2022 23:04:44 +0200 Message-Id: <20221011230356.7805e942abc6.Ie109060a7378c3c603673bc488e2df0f7509c147@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg If we don't have CONFIG_CRYPTO_HASH_INFO then we cannot use this. Signed-off-by: Johannes Berg --- backport/backport-include/linux/verification.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/linux/verification.h b/backport/backport-include/linux/verification.h index 5fd0a2d3b09f..908d1a2601ca 100644 --- a/backport/backport-include/linux/verification.h +++ b/backport/backport-include/linux/verification.h @@ -1,7 +1,8 @@ #ifndef __BP_VERIFICATION_H #define __BP_VERIFICATION_H #include -#if LINUX_VERSION_IS_GEQ(4,7,0) && !defined(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) +#if (LINUX_VERSION_IS_GEQ(4,7,0) && !defined(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION)) && \ + defined(CONFIG_CRYPTO_HASH_INFO) #include_next #else #include From patchwork Tue Oct 11 21:04:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004376 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15F8CC43217 for ; Tue, 11 Oct 2022 21:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbiJKVF1 (ORCPT ); Tue, 11 Oct 2022 17:05:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbiJKVFF (ORCPT ); Tue, 11 Oct 2022 17:05:05 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5CBD3F330 for ; Tue, 11 Oct 2022 14:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=ep7gDLXKh+lNi8c/tFIW7bawV7AZxzFWRUYoHvj/QgU=; t=1665522302; x=1666731902; b=S85jJ0pmpHfucY32ntdPgP++e/VybwF5DSQX3/JKHBSadOU LTQ15azvPEXyE33ZofPZzqmI0RilIibKNzOThMLXCuI8PkmZPwNcm7uf7tnrxAEkXCiOR0G7R2Oe/ oreXANZ28+kq68ikWtaZLkzDd3DomtpVOF/OG4px35s9wrjn/OFr+M0FgE1m0tQMpz2iUw5/RBtUy +I40g7owp48C+F3SA9KyzVKrnVQwTJ0gcKubHuK/lqK2mUBTb7FlkQu3FbPKRg+DhoHmDOAyNSn2+ c35LzQagnKLgJjKjBK0bkDdfk7LfzRTtPmPNErW6SQs9mqvimXhgu4G9S1B06Qbw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQt-0045LP-2k; Tue, 11 Oct 2022 23:04:59 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 37/38] backports: add thermal_zone_device_enable() Date: Tue, 11 Oct 2022 23:04:45 +0200 Message-Id: <20221011230356.89f59316624f.I356df6f58af39de37026dd4df86c21daa9f735b9@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/thermal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index 8210facf3697..f0be1199c5e7 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -3,6 +3,18 @@ #include_next #include +#ifdef CONFIG_THERMAL +#if LINUX_VERSION_IS_LESS(5,9,0) +static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) +{ return 0; } +#endif /* < 5.9.0 */ +#else /* CONFIG_THERMAL */ +#if LINUX_VERSION_IS_LESS(5,9,0) +static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) +{ return -ENODEV; } +#endif /* < 5.9.0 */ +#endif /* CONFIG_THERMAL */ + #if LINUX_VERSION_IS_LESS(5,9,0) #define thermal_zone_device_enable LINUX_BACKPORT(thermal_zone_device_enable) static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) From patchwork Tue Oct 11 21:04:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13004377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7A68C43219 for ; Tue, 11 Oct 2022 21:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbiJKVF1 (ORCPT ); Tue, 11 Oct 2022 17:05:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbiJKVFF (ORCPT ); Tue, 11 Oct 2022 17:05:05 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 766F9222B5 for ; Tue, 11 Oct 2022 14:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=sAb9rVwfBDA/YRqir10+ZsxQ/6vrxEgD+J54ZZWiws0=; t=1665522302; x=1666731902; b=AHdCfmVXKyr/b63dCiRw+QGRJJmdyco+p6bxKIs1hiq5NoV FSXvLrPaLhtkVoI3tjU81K+cvaz/uZFKKoWtGb5+TRVhIPMthzsk9JBSXaQgggw7A/Vr+ur0pJtqG l1TISq+sa2Mi1cRGPNIMuKrh3WNcx+DOAudYAmaGD5HMz6aHDDdVTxQRy3hjSEPwIhlcAi3RhxMfH 8HyNUuSNuMXhRxOjudwXudbTuBNp0el6LncpLPAH180L5wDBLw1IksAFo2lQQyftRhYBqsGu/jv1L C6Ic7hKQGVEtpdHj7ycD6PgKX3srd545+UE1WWy6Ba5e2qkEQdRMwlAFWk5lzmOw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oiMQu-0045LP-0Z; Tue, 11 Oct 2022 23:05:00 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: nbd@nbd.name, Johannes Berg Subject: [PATCH 38/38] backports: add virtio_reset_device Date: Tue, 11 Oct 2022 23:04:46 +0200 Message-Id: <20221011230356.4571ec239020.I3dd09cc0b68e7a93e003ef10216ec310d74e80de@changeid> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221011210446.144768-1-johannes@sipsolutions.net> References: <20221011210446.144768-1-johannes@sipsolutions.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg We need this for hwsim. Signed-off-by: Johannes Berg --- backport/backport-include/linux/virtio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/virtio.h diff --git a/backport/backport-include/linux/virtio.h b/backport/backport-include/linux/virtio.h new file mode 100644 index 000000000000..98c844918251 --- /dev/null +++ b/backport/backport-include/linux/virtio.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_LINUX_VIRTIO_H +#define __BACKPORT_LINUX_VIRTIO_H +#include_next + +#if LINUX_VERSION_IS_LESS(5,17,0) +#include +static inline void virtio_reset_device(struct virtio_device *dev) +{ + dev->config->reset(dev); +} +#endif + +#endif /* __BACKPORT_LINUX_VIRTIO_H */