Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: update to latest version for series 5.10, 5.15, 6.1 #3708

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/kernel-5.10/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ path = "../packages.rs"

[[package.metadata.build-package.external-files]]
# Use latest-srpm-url.sh to get this.
url = "https://cdn.amazonlinux.com/blobstore/d56d799376346afd56ebe3eec4b500b23c6fd3954f66b65aa7c867848d17a950/kernel-5.10.201-191.748.amzn2.src.rpm"
sha512 = "8d8715a1e06dbf7adbc1b5f80e99ec6b5d448c9aefd69f48f77fe6c80bd0e2668a963f85360fefd93ea979e2d2a5323d916301f2f59961e125a5fe6c8b38065f"
url = "https://cdn.amazonlinux.com/blobstore/9feb6cecf780648ffd492525552ba31ce039667031f7ff32ff8a8802145f4827/kernel-5.10.205-195.804.amzn2.src.rpm"
sha512 = "409ddcfcd2f29ab7e7cff8d38ea00fbbd2f2960e4eeffbb4031997921becc797b7e29a66c3869b70e362530d2ed30b747472dbee229f21f9499e3d90f40a880e"

[build-dependencies]
microcode = { path = "../microcode" }
6 changes: 6 additions & 0 deletions packages/kernel-5.10/config-bottlerocket
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ CONFIG_EXT4_USE_FOR_EXT2=y

# Disable obsolete NIC drivers
# CONFIG_QLGE is not set
# CONFIG_MLX4_CORE is not set
# CONFIG_MLX4_EN is not set
# CONFIG_MLX4_INFINIBAND is not set
# CONFIG_MLXSW_CORE is not set
# CONFIG_MLXFW is not set

# Disable unused qdiscs
# - sch_cake targets home routers and residential links
Expand All @@ -171,3 +176,4 @@ CONFIG_SCSI_SMARTPQI=m

# Disable AL port of BBR2 congestion algorithm
# CONFIG_TCP_CONG_BBR2 is not set

4 changes: 2 additions & 2 deletions packages/kernel-5.10/kernel-5.10.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
%global debug_package %{nil}

Name: %{_cross_os}kernel-5.10
Version: 5.10.201
Version: 5.10.205
Release: 1%{?dist}
Summary: The Linux kernel
License: GPL-2.0 WITH Linux-syscall-note
URL: https://www.kernel.org/
# Use latest-srpm-url.sh to get this.
Source0: https://cdn.amazonlinux.com/blobstore/d56d799376346afd56ebe3eec4b500b23c6fd3954f66b65aa7c867848d17a950/kernel-5.10.201-191.748.amzn2.src.rpm
Source0: https://cdn.amazonlinux.com/blobstore/9feb6cecf780648ffd492525552ba31ce039667031f7ff32ff8a8802145f4827/kernel-5.10.205-195.804.amzn2.src.rpm
Source100: config-bottlerocket
Source101: config-bottlerocket-aws
Source102: config-bottlerocket-metal
Expand Down
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

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

4 changes: 2 additions & 2 deletions packages/kernel-5.15/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ path = "../packages.rs"

[[package.metadata.build-package.external-files]]
# Use latest-srpm-url.sh to get this.
url = "https://cdn.amazonlinux.com/blobstore/76d66a34d25e5ebc08dc424d9b03b0ecb44046eb05d95e47459447a5ab582cd2/kernel-5.15.139-93.147.amzn2.src.rpm"
sha512 = "f63269b6466df01b5a6a3387091665cb8931090fa73d848f0d77a6729aa7241d04be77383e34a41bed575cd295bf722bd6668965d1f1147d9ca975ae04b53219"
url = "https://cdn.amazonlinux.com/blobstore/ee035f7e9f6cfe0e00a4c32b3f7d9170e85ca9e9f5cc5026b601b532343b260d/kernel-5.15.145-95.156.amzn2.src.rpm"
sha512 = "372738cd8139c6904a047e9298373ee60dc64a5776a624399615ad13736fc21cd9ab70bccee4a0aa12fcdbbf3fd2b1d01a9d8bf4ad6c4b9063f0404c904db250"

[build-dependencies]
microcode = { path = "../microcode" }
8 changes: 6 additions & 2 deletions packages/kernel-5.15/kernel-5.15.spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
%global debug_package %{nil}

Name: %{_cross_os}kernel-5.15
Version: 5.15.139
Version: 5.15.145
Release: 1%{?dist}
Summary: The Linux kernel
License: GPL-2.0 WITH Linux-syscall-note
URL: https://www.kernel.org/
# Use latest-srpm-url.sh to get this.
Source0: https://cdn.amazonlinux.com/blobstore/76d66a34d25e5ebc08dc424d9b03b0ecb44046eb05d95e47459447a5ab582cd2/kernel-5.15.139-93.147.amzn2.src.rpm
Source0: https://cdn.amazonlinux.com/blobstore/ee035f7e9f6cfe0e00a4c32b3f7d9170e85ca9e9f5cc5026b601b532343b260d/kernel-5.15.145-95.156.amzn2.src.rpm
Source100: config-bottlerocket
Source101: config-bottlerocket-aws
Source102: config-bottlerocket-metal
Expand All @@ -22,6 +22,10 @@ Patch1003: 1003-initramfs-unlink-INITRAMFS_FORCE-from-CMDLINE_-EXTEN.patch
# Increase default of sysctl net.unix.max_dgram_qlen to 512.
Patch1004: 1004-af_unix-increase-default-max_dgram_qlen-to-512.patch

# Backport fix for #3691. Needs to be upstreamed to 5.15 stable series.
Patch5001: 5001-kallsyms-Make-module_kallsyms_on_each_symbol-general.patch
Patch5002: 5002-tracing-kprobes-Fix-symbol-counting-logic-by-looking.patch

BuildRequires: bc
BuildRequires: elfutils-devel
BuildRequires: hostname
Expand Down
4 changes: 2 additions & 2 deletions packages/kernel-6.1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ path = "../packages.rs"

[[package.metadata.build-package.external-files]]
# Use latest-srpm-url.sh to get this.
url = "https://cdn.amazonlinux.com/al2023/blobstore/5880ce1298c2bb541461845a29b2787036b8d18aff0f0bc308117a5f9990057e/kernel-6.1.66-91.160.amzn2023.src.rpm"
sha512 = "4a2b52e6fc8045a5bdf3f7a4a8080623206352e2921d9cf899e367c9102a806dc1135985863cb5efc43c4a757971404e88abdea9c78dcb55cb64e204f97dc232"
url = "https://cdn.amazonlinux.com/al2023/blobstore/f0517376e35e75defefac98e867091249abdcbad3d0958d58d19c0db26a8d0c7/kernel-6.1.66-93.164.amzn2023.src.rpm"
sha512 = "215330abf659fd459d79bee3cd1c7beb6075a08f3eacd484ce1836169e436ea6b98462e9e5bd6d1ccb79474b1b5c54f21f3e5643fc47fac954ae84701c32a00c"

[build-dependencies]
microcode = { path = "../microcode" }
2 changes: 1 addition & 1 deletion packages/kernel-6.1/kernel-6.1.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Summary: The Linux kernel
License: GPL-2.0 WITH Linux-syscall-note
URL: https://www.kernel.org/
# Use latest-srpm-url.sh to get this.
Source0: https://cdn.amazonlinux.com/al2023/blobstore/5880ce1298c2bb541461845a29b2787036b8d18aff0f0bc308117a5f9990057e/kernel-6.1.66-91.160.amzn2023.src.rpm
Source0: https://cdn.amazonlinux.com/al2023/blobstore/f0517376e35e75defefac98e867091249abdcbad3d0958d58d19c0db26a8d0c7/kernel-6.1.66-93.164.amzn2023.src.rpm
Source100: config-bottlerocket
Source101: config-bottlerocket-aws
Source102: config-bottlerocket-metal
Expand Down