-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3708 from markusboehme/package-update/kernels-202…
…4-01-10 kernel: update to latest version for series 5.10, 5.15, 6.1
- Loading branch information
Showing
9 changed files
with
143 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
packages/kernel-5.15/5001-kallsyms-Make-module_kallsyms_on_each_symbol-general.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
From 5d5e377de988002f0db05c90ef39010503c61cee Mon Sep 17 00:00:00 2001 | ||
From: Jiri Olsa <[email protected]> | ||
Date: Tue, 25 Oct 2022 15:41:41 +0200 | ||
Subject: [PATCH] kallsyms: Make module_kallsyms_on_each_symbol generally | ||
available | ||
|
||
commit 73feb8d5fa3b755bb51077c0aabfb6aa556fd498 upstream. | ||
|
||
Making module_kallsyms_on_each_symbol generally available, so it | ||
can be used outside CONFIG_LIVEPATCH option in following changes. | ||
|
||
Rather than adding another ifdef option let's make the function | ||
generally available (when CONFIG_KALLSYMS and CONFIG_MODULES | ||
options are defined). | ||
|
||
Cc: Christoph Hellwig <[email protected]> | ||
Acked-by: Song Liu <[email protected]> | ||
Signed-off-by: Jiri Olsa <[email protected]> | ||
Link: https://lore.kernel.org/r/[email protected] | ||
Signed-off-by: Alexei Starovoitov <[email protected]> | ||
Signed-off-by: Greg Kroah-Hartman <[email protected]> | ||
Stable-dep-of: 926fe783c8a6 ("tracing/kprobes: Fix symbol counting logic by looking at modules as well") | ||
Signed-off-by: Markus Boehme <[email protected]> | ||
--- | ||
include/linux/module.h | 9 +++++++++ | ||
kernel/module.c | 2 -- | ||
2 files changed, 9 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/include/linux/module.h b/include/linux/module.h | ||
index c9f1200b2312..701c150485b2 100644 | ||
--- a/include/linux/module.h | ||
+++ b/include/linux/module.h | ||
@@ -867,8 +867,17 @@ static inline bool module_sig_ok(struct module *module) | ||
} | ||
#endif /* CONFIG_MODULE_SIG */ | ||
|
||
+#if defined(CONFIG_MODULES) && defined(CONFIG_KALLSYMS) | ||
int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, | ||
struct module *, unsigned long), | ||
void *data); | ||
+#else | ||
+static inline int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, | ||
+ struct module *, unsigned long), | ||
+ void *data) | ||
+{ | ||
+ return -EOPNOTSUPP; | ||
+} | ||
+#endif /* CONFIG_MODULES && CONFIG_KALLSYMS */ | ||
|
||
#endif /* _LINUX_MODULE_H */ | ||
diff --git a/kernel/module.c b/kernel/module.c | ||
index 3c90840133c0..ba9f2bb57889 100644 | ||
--- a/kernel/module.c | ||
+++ b/kernel/module.c | ||
@@ -4482,7 +4482,6 @@ unsigned long module_kallsyms_lookup_name(const char *name) | ||
return ret; | ||
} | ||
|
||
-#ifdef CONFIG_LIVEPATCH | ||
int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, | ||
struct module *, unsigned long), | ||
void *data) | ||
@@ -4514,7 +4513,6 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, | ||
mutex_unlock(&module_mutex); | ||
return ret; | ||
} | ||
-#endif /* CONFIG_LIVEPATCH */ | ||
#endif /* CONFIG_KALLSYMS */ | ||
|
||
static void cfi_init(struct module *mod) | ||
-- | ||
2.40.1 | ||
|
49 changes: 49 additions & 0 deletions
49
packages/kernel-5.15/5002-tracing-kprobes-Fix-symbol-counting-logic-by-looking.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From 7bc06ef49649ff064c6bc3825e047c500eea141a Mon Sep 17 00:00:00 2001 | ||
From: Andrii Nakryiko <[email protected]> | ||
Date: Fri, 27 Oct 2023 16:31:26 -0700 | ||
Subject: [PATCH] tracing/kprobes: Fix symbol counting logic by looking at | ||
modules as well | ||
|
||
commit 926fe783c8a64b33997fec405cf1af3e61aed441 upstream. | ||
|
||
Recent changes to count number of matching symbols when creating | ||
a kprobe event failed to take into account kernel modules. As such, it | ||
breaks kprobes on kernel module symbols, by assuming there is no match. | ||
|
||
Fix this my calling module_kallsyms_on_each_symbol() in addition to | ||
kallsyms_on_each_match_symbol() to perform a proper counting. | ||
|
||
Link: https://lore.kernel.org/all/[email protected]/ | ||
|
||
Cc: Francis Laniel <[email protected]> | ||
Cc: [email protected] | ||
Cc: Masami Hiramatsu <[email protected]> | ||
Cc: Steven Rostedt <[email protected]> | ||
Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols") | ||
Signed-off-by: Andrii Nakryiko <[email protected]> | ||
Acked-by: Song Liu <[email protected]> | ||
Signed-off-by: Masami Hiramatsu (Google) <[email protected]> | ||
Signed-off-by: Greg Kroah-Hartman <[email protected]> | ||
Signed-off-by: Hao Wei Tee <[email protected]> | ||
Signed-off-by: Greg Kroah-Hartman <[email protected]> | ||
Signed-off-by: Markus Boehme <[email protected]> | ||
--- | ||
kernel/trace/trace_kprobe.c | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c | ||
index 1c565db2de7b..21aef22a8489 100644 | ||
--- a/kernel/trace/trace_kprobe.c | ||
+++ b/kernel/trace/trace_kprobe.c | ||
@@ -735,6 +735,8 @@ static unsigned int number_of_same_symbols(char *func_name) | ||
|
||
kallsyms_on_each_symbol(count_symbols, &args); | ||
|
||
+ module_kallsyms_on_each_symbol(count_symbols, &args); | ||
+ | ||
return args.count; | ||
} | ||
|
||
-- | ||
2.40.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters