From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Michael Kelley <mhklinux@outlook.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/core] objtool/klp: Only enable --checksum when needed
Date: Tue, 18 Nov 2025 09:14:04 -0000 [thread overview]
Message-ID: <176345724486.498.8088274037182866475.tip-bot2@tip-bot2> (raw)
In-Reply-To: <edbb1ca215e4926e02edb493b68b9d6d063e902f.1762990139.git.jpoimboe@kernel.org>
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: 2092007aa32f8dd968c38751bd1b7cac9b1f738d
Gitweb: https://git.kernel.org/tip/2092007aa32f8dd968c38751bd1b7cac9b1f738d
Author: Josh Poimboeuf <jpoimboe@kernel.org>
AuthorDate: Wed, 12 Nov 2025 15:32:34 -08:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 18 Nov 2025 09:59:26 +01:00
objtool/klp: Only enable --checksum when needed
With CONFIG_KLP_BUILD enabled, checksums are only needed during a
klp-build run. There's no need to enable them for normal kernel builds.
This also has the benefit of softening the xxhash dependency.
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/edbb1ca215e4926e02edb493b68b9d6d063e902f.1762990139.git.jpoimboe@kernel.org
---
arch/x86/boot/startup/Makefile | 2 +-
scripts/Makefile.lib | 1 -
scripts/livepatch/klp-build | 4 ++++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/startup/Makefile b/arch/x86/boot/startup/Makefile
index e8fdf02..5e499cf 100644
--- a/arch/x86/boot/startup/Makefile
+++ b/arch/x86/boot/startup/Makefile
@@ -36,7 +36,7 @@ $(patsubst %.o,$(obj)/%.o,$(lib-y)): OBJECT_FILES_NON_STANDARD := y
# relocations, even if other objtool actions are being deferred.
#
$(pi-objs): objtool-enabled = 1
-$(pi-objs): objtool-args = $(if $(delay-objtool),,$(objtool-args-y)) --noabs
+$(pi-objs): objtool-args = $(if $(delay-objtool),--dry-run,$(objtool-args-y)) --noabs
#
# Confine the startup code by prefixing all symbols with __pi_ (for position
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index f4b3391..28a1c08 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -173,7 +173,6 @@ ifdef CONFIG_OBJTOOL
objtool := $(objtree)/tools/objtool/objtool
-objtool-args-$(CONFIG_KLP_BUILD) += --checksum
objtool-args-$(CONFIG_HAVE_JUMP_LABEL_HACK) += --hacks=jump_label
objtool-args-$(CONFIG_HAVE_NOINSTR_HACK) += --hacks=noinstr
objtool-args-$(CONFIG_MITIGATION_CALL_DEPTH_TRACKING) += --hacks=skylake
diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build
index 881e052..8822721 100755
--- a/scripts/livepatch/klp-build
+++ b/scripts/livepatch/klp-build
@@ -489,8 +489,11 @@ clean_kernel() {
build_kernel() {
local log="$TMP_DIR/build.log"
+ local objtool_args=()
local cmd=()
+ objtool_args=("--checksum")
+
cmd=("make")
# When a patch to a kernel module references a newly created unexported
@@ -513,6 +516,7 @@ build_kernel() {
cmd+=("$VERBOSE")
cmd+=("-j$JOBS")
cmd+=("KCFLAGS=-ffunction-sections -fdata-sections")
+ cmd+=("OBJTOOL_ARGS=${objtool_args[*]}")
cmd+=("vmlinux")
cmd+=("modules")
prev parent reply other threads:[~2025-11-18 9:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 23:32 [PATCH 0/2] objtool: xxhash dependency improvements Josh Poimboeuf
2025-11-12 23:32 ` [PATCH 1/2] objtool: Set minimum xxhash version to 0.8 Josh Poimboeuf
2025-11-13 2:25 ` Michael Kelley
2025-11-18 9:14 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2025-11-12 23:32 ` [PATCH 2/2] objtool/klp: Only enable --checksum when needed Josh Poimboeuf
2025-11-13 2:29 ` Michael Kelley
2025-11-18 9:14 ` tip-bot2 for Josh Poimboeuf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176345724486.498.8088274037182866475.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®