mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 19:00:34 +02:00
kernel: update to 6.1.3
the kernel-6.1.x series should be the next lts series...
This commit is contained in:
16
src/patches/linux/linux-6.0-fix_external_module_build.patch
Normal file
16
src/patches/linux/linux-6.0-fix_external_module_build.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 8478e13e9424..00c747575f0c 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1734,9 +1734,9 @@ PHONY += prepare
|
||||
# now expand this into a simple variable to reduce the cost of shell evaluations
|
||||
prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
|
||||
prepare:
|
||||
- @if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; then \
|
||||
+ @if [ "$(CC_VERSION_TEXT)" != $(CONFIG_CC_VERSION_TEXT) ]; then \
|
||||
echo >&2 "warning: the compiler differs from the one used to build the kernel"; \
|
||||
- echo >&2 " The kernel was built by: $(CONFIG_CC_VERSION_TEXT)"; \
|
||||
+ echo >&2 " The kernel was built by: "$(CONFIG_CC_VERSION_TEXT); \
|
||||
echo >&2 " You are using: $(CC_VERSION_TEXT)"; \
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From: Yupeng Li <liyupeng@zbhlos.com>
|
||||
To: Shyam-sundar.S-k@amd.com, hdegoede@redhat.com, markgross@kernel.org
|
||||
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
caizp2008@163.com, Yupeng Li <liyupeng@zbhlos.com>
|
||||
Subject: [PATCH 1/1] platform/x86/amd: Fix pmc compile dependency errors.
|
||||
Date: Wed, 26 Oct 2022 15:25:31 +0800
|
||||
|
||||
When disabled CONFIG_SUSPEND and CONFIG_DEBUG_FS, get_metrics_table
|
||||
and amd_pmc_idlemask_read is defined under two conditions of this,
|
||||
pmc build with implicit declaration of function error.Some build error
|
||||
messages are as follows:
|
||||
|
||||
CC [M] drivers/platform/x86/amd/pmc.o
|
||||
drivers/platform/x86/amd/pmc.c: In function ‘smu_fw_info_show’:
|
||||
drivers/platform/x86/amd/pmc.c:436:6: error: implicit declaration of function ‘get_metrics_table’ [-Werror=implicit-function-declaration]
|
||||
436 | if (get_metrics_table(dev, &table))
|
||||
| ^~~~~~~~~~~~~~~~~
|
||||
drivers/platform/x86/amd/pmc.c: In function ‘amd_pmc_idlemask_show’:
|
||||
drivers/platform/x86/amd/pmc.c:508:8: error: implicit declaration of function ‘amd_pmc_idlemask_read’; did you mean ‘amd_pmc_idlemask_show’? [-Werror=implicit-function-declaration]
|
||||
508 | rc = amd_pmc_idlemask_read(dev, NULL, s);
|
||||
| ^~~~~~~~~~~~~~~~~~~~~
|
||||
| amd_pmc_idlemask_show
|
||||
cc1: some warnings being treated as errors
|
||||
|
||||
Signed-off-by: Yupeng Li <liyupeng@zbhlos.com>
|
||||
Reviewed-by: Caicai <caizp2008@163.com>
|
||||
---
|
||||
drivers/platform/x86/amd/pmc.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
|
||||
index ce859b300712..2b08039921b8 100644
|
||||
--- a/drivers/platform/x86/amd/pmc.c
|
||||
+++ b/drivers/platform/x86/amd/pmc.c
|
||||
@@ -433,8 +433,10 @@ static int smu_fw_info_show(struct seq_file *s, void *unused)
|
||||
struct smu_metrics table;
|
||||
int idx;
|
||||
|
||||
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS)
|
||||
if (get_metrics_table(dev, &table))
|
||||
return -EINVAL;
|
||||
+#endif
|
||||
|
||||
seq_puts(s, "\n=== SMU Statistics ===\n");
|
||||
seq_printf(s, "Table Version: %d\n", table.table_version);
|
||||
@@ -503,11 +505,12 @@ static int amd_pmc_idlemask_show(struct seq_file *s, void *unused)
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
-
|
||||
if (dev->major > 56 || (dev->major >= 55 && dev->minor >= 37)) {
|
||||
+#if defined(CONFIG_SUSPEND) || defined(CONFIG_DEBUG_FS)
|
||||
rc = amd_pmc_idlemask_read(dev, NULL, s);
|
||||
if (rc)
|
||||
return rc;
|
||||
+#endif
|
||||
} else {
|
||||
seq_puts(s, "Unsupported SMU version for Idlemask\n");
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
diff -Naur linux-5.15.59.ORG/include/linux/skbuff.h linux-5.15.59/include/linux/skbuff.h
|
||||
--- linux-5.15.59.ORG/include/linux/skbuff.h 2022-08-03 12:03:56.000000000 +0200
|
||||
+++ linux-5.15.59/include/linux/skbuff.h 2022-08-05 13:28:29.785231584 +0200
|
||||
@@ -807,6 +807,9 @@
|
||||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
|
||||
index 7be5bb4c94b6..9a86f7bdbfce 100644
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -891,6 +891,9 @@ struct sk_buff {
|
||||
|
||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||
unsigned long _nfct;
|
||||
#endif
|
||||
+#endif
|
||||
+#if defined(CONFIG_NETFILTER_XT_MATCH_LAYER7) || defined(CONFIG_NETFILTER_XT_MATCH_LAYER7_MODULE)
|
||||
+ char layer7_flags[1];
|
||||
+#endif
|
||||
#endif
|
||||
unsigned int len,
|
||||
data_len;
|
||||
__u16 mac_len,
|
||||
diff -Naur linux-5.15.59.ORG/include/net/netfilter/nf_conntrack.h linux-5.15.59/include/net/netfilter/nf_conntrack.h
|
||||
--- linux-5.15.59.ORG/include/net/netfilter/nf_conntrack.h 2022-08-03 12:03:56.000000000 +0200
|
||||
+++ linux-5.15.59/include/net/netfilter/nf_conntrack.h 2022-08-05 13:28:29.786231577 +0200
|
||||
@@ -119,6 +119,23 @@
|
||||
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
|
||||
index 6a2019aaa464..fecc0a5c4b04 100644
|
||||
--- a/include/net/netfilter/nf_conntrack.h
|
||||
+++ b/include/net/netfilter/nf_conntrack.h
|
||||
@@ -121,6 +121,23 @@ struct nf_conn {
|
||||
/* Extensions */
|
||||
struct nf_ct_ext *ext;
|
||||
|
||||
@@ -38,9 +40,11 @@ diff -Naur linux-5.15.59.ORG/include/net/netfilter/nf_conntrack.h linux-5.15.59/
|
||||
/* Storage reserved for other modules, must be the last member */
|
||||
union nf_conntrack_proto proto;
|
||||
};
|
||||
diff -Naur linux-5.15.59.ORG/include/uapi/linux/netfilter/xt_layer7.h linux-5.15.59/include/uapi/linux/netfilter/xt_layer7.h
|
||||
--- linux-5.15.59.ORG/include/uapi/linux/netfilter/xt_layer7.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-5.15.59/include/uapi/linux/netfilter/xt_layer7.h 2022-08-05 13:28:29.786231577 +0200
|
||||
diff --git a/include/uapi/linux/netfilter/xt_layer7.h b/include/uapi/linux/netfilter/xt_layer7.h
|
||||
new file mode 100644
|
||||
index 000000000000..147cd6477858
|
||||
--- /dev/null
|
||||
+++ b/include/uapi/linux/netfilter/xt_layer7.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+#ifndef _XT_LAYER7_H
|
||||
+#define _XT_LAYER7_H
|
||||
@@ -55,10 +59,11 @@ diff -Naur linux-5.15.59.ORG/include/uapi/linux/netfilter/xt_layer7.h linux-5.15
|
||||
+};
|
||||
+
|
||||
+#endif /* _XT_LAYER7_H */
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/Kconfig linux-5.15.59/net/netfilter/Kconfig
|
||||
--- linux-5.15.59.ORG/net/netfilter/Kconfig 2022-08-03 12:03:56.000000000 +0200
|
||||
+++ linux-5.15.59/net/netfilter/Kconfig 2022-08-05 13:28:29.786231577 +0200
|
||||
@@ -1389,6 +1389,26 @@
|
||||
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
|
||||
index 4b8d04640ff3..9d2140704720 100644
|
||||
--- a/net/netfilter/Kconfig
|
||||
+++ b/net/netfilter/Kconfig
|
||||
@@ -1401,6 +1401,26 @@ config NETFILTER_XT_MATCH_L2TP
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
@@ -85,10 +90,11 @@ diff -Naur linux-5.15.59.ORG/net/netfilter/Kconfig linux-5.15.59/net/netfilter/K
|
||||
config NETFILTER_XT_MATCH_LENGTH
|
||||
tristate '"length" match support'
|
||||
depends on NETFILTER_ADVANCED
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/Makefile linux-5.15.59/net/netfilter/Makefile
|
||||
--- linux-5.15.59.ORG/net/netfilter/Makefile 2022-08-03 12:03:56.000000000 +0200
|
||||
+++ linux-5.15.59/net/netfilter/Makefile 2022-08-05 13:28:29.786231577 +0200
|
||||
@@ -201,6 +201,7 @@
|
||||
diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
|
||||
index 0f060d100880..28a7d4f8be40 100644
|
||||
--- a/net/netfilter/Makefile
|
||||
+++ b/net/netfilter/Makefile
|
||||
@@ -212,6 +212,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT) += xt_recent.o
|
||||
obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o
|
||||
obj-$(CONFIG_NETFILTER_XT_MATCH_SOCKET) += xt_socket.o
|
||||
obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o
|
||||
@@ -96,10 +102,11 @@ diff -Naur linux-5.15.59.ORG/net/netfilter/Makefile linux-5.15.59/net/netfilter/
|
||||
obj-$(CONFIG_NETFILTER_XT_MATCH_STATISTIC) += xt_statistic.o
|
||||
obj-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string.o
|
||||
obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/nf_conntrack_core.c linux-5.15.59/net/netfilter/nf_conntrack_core.c
|
||||
--- linux-5.15.59.ORG/net/netfilter/nf_conntrack_core.c 2022-08-03 12:03:56.000000000 +0200
|
||||
+++ linux-5.15.59/net/netfilter/nf_conntrack_core.c 2022-08-05 13:28:29.787231570 +0200
|
||||
@@ -648,6 +648,11 @@
|
||||
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
|
||||
index 23b3fedd619a..5fa552543967 100644
|
||||
--- a/net/netfilter/nf_conntrack_core.c
|
||||
+++ b/net/netfilter/nf_conntrack_core.c
|
||||
@@ -604,6 +604,11 @@ void nf_ct_destroy(struct nf_conntrack *nfct)
|
||||
*/
|
||||
nf_ct_remove_expectations(ct);
|
||||
|
||||
@@ -108,27 +115,30 @@ diff -Naur linux-5.15.59.ORG/net/netfilter/nf_conntrack_core.c linux-5.15.59/net
|
||||
+ kfree(ct->layer7.app_data);
|
||||
+#endif
|
||||
+
|
||||
nf_ct_del_from_dying_or_unconfirmed_list(ct);
|
||||
if (ct->master)
|
||||
nf_ct_put(ct->master);
|
||||
|
||||
local_bh_enable();
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/nf_conntrack_standalone.c linux-5.15.59/net/netfilter/nf_conntrack_standalone.c
|
||||
--- linux-5.15.59.ORG/net/netfilter/nf_conntrack_standalone.c 2022-08-03 12:03:56.000000000 +0200
|
||||
+++ linux-5.15.59/net/netfilter/nf_conntrack_standalone.c 2022-08-05 13:28:29.787231570 +0200
|
||||
@@ -370,6 +370,11 @@
|
||||
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
|
||||
index bca839ab1ae8..69fb7b8296a2 100644
|
||||
--- a/net/netfilter/nf_conntrack_standalone.c
|
||||
+++ b/net/netfilter/nf_conntrack_standalone.c
|
||||
@@ -373,6 +373,11 @@ static int ct_seq_show(struct seq_file *s, void *v)
|
||||
ct_show_zone(s, ct, NF_CT_DEFAULT_ZONE_DIR);
|
||||
ct_show_delta_time(s, ct);
|
||||
|
||||
+ #if defined(CONFIG_NETFILTER_XT_MATCH_LAYER7) || defined(CONFIG_NETFILTER_XT_MATCH_LAYER7_MODULE)
|
||||
+#if defined(CONFIG_NETFILTER_XT_MATCH_LAYER7) || defined(CONFIG_NETFILTER_XT_MATCH_LAYER7_MODULE)
|
||||
+ if(ct->layer7.app_proto)
|
||||
+ seq_printf(s, "l7proto=%s ", ct->layer7.app_proto);
|
||||
+ #endif
|
||||
+#endif
|
||||
+
|
||||
seq_printf(s, "use=%u\n", refcount_read(&ct->ct_general.use));
|
||||
|
||||
if (seq_has_overflowed(s))
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/regexp/regexp.c linux-5.15.59/net/netfilter/regexp/regexp.c
|
||||
--- linux-5.15.59.ORG/net/netfilter/regexp/regexp.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-5.15.59/net/netfilter/regexp/regexp.c 2022-08-05 13:28:29.788231563 +0200
|
||||
diff --git a/net/netfilter/regexp/regexp.c b/net/netfilter/regexp/regexp.c
|
||||
new file mode 100644
|
||||
index 000000000000..900698886531
|
||||
--- /dev/null
|
||||
+++ b/net/netfilter/regexp/regexp.c
|
||||
@@ -0,0 +1,1197 @@
|
||||
+/*
|
||||
+ * regcomp and regexec -- regsub and regerror are elsewhere
|
||||
@@ -1327,9 +1337,11 @@ diff -Naur linux-5.15.59.ORG/net/netfilter/regexp/regexp.c linux-5.15.59/net/net
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/regexp/regexp.h linux-5.15.59/net/netfilter/regexp/regexp.h
|
||||
--- linux-5.15.59.ORG/net/netfilter/regexp/regexp.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-5.15.59/net/netfilter/regexp/regexp.h 2022-08-05 13:28:29.788231563 +0200
|
||||
diff --git a/net/netfilter/regexp/regexp.h b/net/netfilter/regexp/regexp.h
|
||||
new file mode 100644
|
||||
index 000000000000..a72eba71fb61
|
||||
--- /dev/null
|
||||
+++ b/net/netfilter/regexp/regexp.h
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * Definitions etc. for regexp(3) routines.
|
||||
@@ -1372,18 +1384,22 @@ diff -Naur linux-5.15.59.ORG/net/netfilter/regexp/regexp.h linux-5.15.59/net/net
|
||||
+void regerror(char *s);
|
||||
+
|
||||
+#endif
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/regexp/regmagic.h linux-5.15.59/net/netfilter/regexp/regmagic.h
|
||||
--- linux-5.15.59.ORG/net/netfilter/regexp/regmagic.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-5.15.59/net/netfilter/regexp/regmagic.h 2022-08-05 13:28:29.788231563 +0200
|
||||
diff --git a/net/netfilter/regexp/regmagic.h b/net/netfilter/regexp/regmagic.h
|
||||
new file mode 100644
|
||||
index 000000000000..5acf4478ff71
|
||||
--- /dev/null
|
||||
+++ b/net/netfilter/regexp/regmagic.h
|
||||
@@ -0,0 +1,5 @@
|
||||
+/*
|
||||
+ * The first byte of the regexp internal "program" is actually this magic
|
||||
+ * number; the start node begins in the second byte.
|
||||
+ */
|
||||
+#define MAGIC 0234
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/regexp/regsub.c linux-5.15.59/net/netfilter/regexp/regsub.c
|
||||
--- linux-5.15.59.ORG/net/netfilter/regexp/regsub.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-5.15.59/net/netfilter/regexp/regsub.c 2022-08-05 13:28:29.788231563 +0200
|
||||
diff --git a/net/netfilter/regexp/regsub.c b/net/netfilter/regexp/regsub.c
|
||||
new file mode 100644
|
||||
index 000000000000..339631f06f00
|
||||
--- /dev/null
|
||||
+++ b/net/netfilter/regexp/regsub.c
|
||||
@@ -0,0 +1,95 @@
|
||||
+/*
|
||||
+ * regsub
|
||||
@@ -1480,9 +1496,11 @@ diff -Naur linux-5.15.59.ORG/net/netfilter/regexp/regsub.c linux-5.15.59/net/net
|
||||
+ }
|
||||
+ *dst++ = '\0';
|
||||
+}
|
||||
diff -Naur linux-5.15.59.ORG/net/netfilter/xt_layer7.c linux-5.15.59/net/netfilter/xt_layer7.c
|
||||
--- linux-5.15.59.ORG/net/netfilter/xt_layer7.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-5.15.59/net/netfilter/xt_layer7.c 2022-08-05 13:28:29.788231563 +0200
|
||||
diff --git a/net/netfilter/xt_layer7.c b/net/netfilter/xt_layer7.c
|
||||
new file mode 100644
|
||||
index 000000000000..a7eb760123bf
|
||||
--- /dev/null
|
||||
+++ b/net/netfilter/xt_layer7.c
|
||||
@@ -0,0 +1,666 @@
|
||||
+/*
|
||||
+ Kernel module to match application layer (OSI layer 7) data in connections.
|
||||
Reference in New Issue
Block a user