{"id":2232770,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2232770/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260505-module-hashes-v5-13-e174a5a49fce@weissschuh.net/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/1.2/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<20260505-module-hashes-v5-13-e174a5a49fce@weissschuh.net>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20260505-module-hashes-v5-13-e174a5a49fce@weissschuh.net/","date":"2026-05-05T09:05:17","name":"[v5,13/14] kbuild: move handling of module stripping to Makefile.lib","commit_ref":null,"pull_url":null,"state":"handled-elsewhere","archived":false,"hash":"30070c0b62802ae46b0de7e507f25f0658c851d0","submitter":{"id":82751,"url":"http://patchwork.ozlabs.org/api/1.2/people/82751/?format=json","name":"Thomas Weißschuh","email":"linux@weissschuh.net"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260505-module-hashes-v5-13-e174a5a49fce@weissschuh.net/mbox/","series":[{"id":502791,"url":"http://patchwork.ozlabs.org/api/1.2/series/502791/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=502791","date":"2026-05-05T09:05:17","name":"module: Introduce hash-based integrity checking","version":5,"mbox":"http://patchwork.ozlabs.org/series/502791/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2232770/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2232770/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linuxppc-dev+bounces-20456-incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=weissschuh.net header.i=@weissschuh.net\n header.a=rsa-sha256 header.s=mail header.b=Up2Yt+/i;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-20456-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)","lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2a01:4f8:c010:41de::1\"","lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net","lists.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=weissschuh.net header.i=@weissschuh.net\n header.a=rsa-sha256 header.s=mail header.b=Up2Yt+/i;\n\tdkim-atps=neutral","lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=weissschuh.net\n (client-ip=2a01:4f8:c010:41de::1; helo=todd.t-8ch.de;\n envelope-from=linux@weissschuh.net; receiver=lists.ozlabs.org)"],"Received":["from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8t620xSCz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 19:10:49 +1000 (AEST)","from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g8t600qdxz2xqJ;\n\tTue, 05 May 2026 19:10:48 +1000 (AEST)","from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4g8t5y4XPPz2xSF\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 05 May 2026 19:10:46 +1000 (AEST)"],"ARC-Seal":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777972247;\n\tcv=none;\n b=kircKfZT3DhFduBBbSWo7ZF+E9L6gIpjqkgD7mMGWXGii7gQZ4t+ILbpJXXBJxDfYzWnVTFXjl5m+AdjpQPysrm1Oj89VFE/J5Wl6aUvOQUnfVGmXMxlo2Z1oq5I3ocO8vJaToHRDCnAmSJNLCPDvpJ6cyg2Ab6RmuKnzu1jAaLBFQ3SaQYk5ISr8pHrzvcuiKTaZlJsbGcxl0mp0iZ78BR1rIjCI+mFRgdu2M2XTOhJ7tcLsrEbHBczETfNZU2LfFQCaraj6dih+sogYaabrQSZKEskVQdEKA190ZtMPZ6dIYOHSVKR7GY0wvyMlLgAPXiY0bBCnhgZrkbqmZP9ag==","ARC-Message-Signature":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777972247; c=relaxed/relaxed;\n\tbh=FPhlEOdbjaNnDHfMW3do6+nuibrLXktIt9R7lAS6R10=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=LjQEnE0KYFQCHKFUD3TCr5oJreNRtDd8i7XI2sijPZ7HFFb4Vv3C1YsiBlamgrOV/6rZJeMtpFLqtPmuhjw2O/tucIOelJEl4ttp7DJv7oG97WuLIJoZtkKxDj7JGLN2aP4M+/FTvCvKWQWv6S9gS05lBPVigfuMxhXWi9ACUA9YUyRuoUCfZIC8pQdjTTsSLPZHjJ/qgWVaqujM2h9uUUrprM8zRBHpTrX5piKps3J+S8RrIs/dFpdaqALrhCqikC85z6l5U7egJMoVCoSygeQBDCtDYqJknD1TW4YOa8Z2O4i8xZHLzl9ECjuvbuDYxKQ5DAvIYvZx7BTzL7U+cw==","ARC-Authentication-Results":"i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net;\n dkim=pass (1024-bit key;\n unprotected) header.d=weissschuh.net header.i=@weissschuh.net\n header.a=rsa-sha256 header.s=mail header.b=Up2Yt+/i; dkim-atps=neutral;\n spf=pass (client-ip=2a01:4f8:c010:41de::1; helo=todd.t-8ch.de;\n envelope-from=linux@weissschuh.net;\n receiver=lists.ozlabs.org) smtp.mailfrom=weissschuh.net","X-Greylist":"delayed 317 seconds by postgrey-1.37 at boromir;\n Tue, 05 May 2026 19:10:46 AEST","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net;\n\ts=mail; t=1777972242;\n\tbh=4sym237a3wzjHBQDzN72ZtH7iFNxSpm8gXdzQ0UrWmw=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=Up2Yt+/iewqFT4CdTJtEHClfccc2bXaZkDpSUGByup4Vjop5SUh30Qw8cs4enAqE3\n\t ezzRxbNnLJYJrCGV+ryDaz+xSLJTy627+iEeBG9M2YPm1ZbEn/3tJi93kE1vSEhuZG\n\t GHsrlN1CEma0J6DFPiAPBGPBIuHEuzWSdyzkEtF0=","From":"=?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net>","Date":"Tue, 05 May 2026 11:05:17 +0200","Subject":"[PATCH v5 13/14] kbuild: move handling of module stripping to\n Makefile.lib","X-Mailing-List":"linuxppc-dev@lists.ozlabs.org","List-Id":"<linuxppc-dev.lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev+help@lists.ozlabs.org>","List-Owner":"<mailto:linuxppc-dev+owner@lists.ozlabs.org>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Archive":"<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Subscribe":"<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>","List-Unsubscribe":"<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>","Precedence":"list","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"8bit","Message-Id":"<20260505-module-hashes-v5-13-e174a5a49fce@weissschuh.net>","References":"<20260505-module-hashes-v5-0-e174a5a49fce@weissschuh.net>","In-Reply-To":"<20260505-module-hashes-v5-0-e174a5a49fce@weissschuh.net>","To":"Alexei Starovoitov <ast@kernel.org>,\n Daniel Borkmann <daniel@iogearbox.net>, Andrii Nakryiko <andrii@kernel.org>,\n Eduard Zingerman <eddyz87@gmail.com>,\n Kumar Kartikeya Dwivedi <memxor@gmail.com>,\n Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>,\n Arnd Bergmann <arnd@arndb.de>, Luis Chamberlain <mcgrof@kernel.org>,\n Petr Pavlu <petr.pavlu@suse.com>, Sami Tolvanen <samitolvanen@google.com>,\n Daniel Gomez <da.gomez@samsung.com>, Paul Moore <paul@paul-moore.com>,\n James Morris <jmorris@namei.org>, \"Serge E. Hallyn\" <serge@hallyn.com>,\n Jonathan Corbet <corbet@lwn.net>, Madhavan Srinivasan <maddy@linux.ibm.com>,\n Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>,\n Naveen N Rao <naveen@kernel.org>, Mimi Zohar <zohar@linux.ibm.com>,\n Roberto Sassu <roberto.sassu@huawei.com>,\n Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,\n Eric Snowberg <eric.snowberg@oracle.com>,\n Nicolas Schier <nicolas.schier@linux.dev>,\n Daniel Gomez <da.gomez@kernel.org>, Aaron Tomlin <atomlin@atomlin.com>,\n \"Christophe Leroy (CS GROUP)\" <chleroy@kernel.org>,\n Nicolas Bouchinet <nicolas.bouchinet@oss.cyber.gouv.fr>,\n Xiu Jianfeng <xiujianfeng@huawei.com>,\n Christophe Leroy <chleroy@kernel.org>","Cc":"Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>,\n  Yonghong Song <yonghong.song@linux.dev>, Jiri Olsa <jolsa@kernel.org>,\n  bpf@vger.kernel.org,\n =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>,\n  Arnout Engelen <arnout@bzzt.net>, Mattia Rizzolo <mattia@mapreri.org>,\n  kpcyrd <kpcyrd@archlinux.org>, Christian Heusel <christian@heusel.eu>,\n\t=?utf-8?q?C=C3=A2ju_Mihai-Drosi?= <mcaju95@gmail.com>,\n  Eric Biggers <ebiggers@kernel.org>,\n  Sebastian Andrzej Siewior <bigeasy@linutronix.de>,\n  linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,\n  linux-arch@vger.kernel.org, linux-modules@vger.kernel.org,\n  linux-security-module@vger.kernel.org, linux-doc@vger.kernel.org,\n  linuxppc-dev@lists.ozlabs.org, linux-integrity@vger.kernel.org,\n  debian-kernel@lists.debian.org,\n =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net>","X-Mailer":"b4 0.15.2","X-Developer-Signature":"v=1; a=ed25519-sha256; t=1777971921; l=3531;\n i=linux@weissschuh.net; s=20221212; h=from:subject:message-id;\n bh=4sym237a3wzjHBQDzN72ZtH7iFNxSpm8gXdzQ0UrWmw=;\n b=yK767BHsapJV15dUfHNe8idRaS/QEQT7THkpmPRTFTWVR8JNmIEaIi786mZC/3G3QxzBTTSEr\n ElIP5qYLNiJD4Y2+AainUiunn1D7qpG9VUvSrTlTN7McIL/cM3ZvgES","X-Developer-Key":"i=linux@weissschuh.net; a=ed25519;\n pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw=","X-Spam-Status":"No, score=-0.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1 OzLabs 8","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"},"content":"To allow CONFIG_MODULE_HASHES in combination with INSTALL_MOD_STRIP,\nthis logc will also be used by Makefile.modfinal.\n\nMove it to a shared location to enable reuse.\n\nSigned-off-by: Thomas Weißschuh <linux@weissschuh.net>\n---\n scripts/Makefile.lib     | 32 ++++++++++++++++++++++++++++++++\n scripts/Makefile.modinst | 37 +++++--------------------------------\n 2 files changed, 37 insertions(+), 32 deletions(-)","diff":"diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib\nindex 0718e39cedda..bb713a1a11be 100644\n--- a/scripts/Makefile.lib\n+++ b/scripts/Makefile.lib\n@@ -484,6 +484,38 @@ define sed-offsets\n \ts:->::; p;}'\n endef\n \n+#\n+# Module Installation\n+#\n+quiet_cmd_install_mod = INSTALL $@\n+      cmd_install_mod = cp $< $@\n+\n+# Module Strip\n+# ---------------------------------------------------------------------------\n+#\n+# INSTALL_MOD_STRIP, if defined, will cause modules to be stripped after they\n+# are installed. If INSTALL_MOD_STRIP is '1', then the default option\n+# --strip-debug will be used. Otherwise, INSTALL_MOD_STRIP value will be used\n+# as the options to the strip command.\n+ifeq ($(INSTALL_MOD_STRIP),1)\n+mod-strip-option := --strip-debug\n+else\n+mod-strip-option := $(INSTALL_MOD_STRIP)\n+endif\n+\n+# Strip\n+ifdef INSTALL_MOD_STRIP\n+\n+quiet_cmd_strip_mod = STRIP   $@\n+      cmd_strip_mod = $(STRIP) $(mod-strip-option) $@\n+\n+else\n+\n+quiet_cmd_strip_mod =\n+      cmd_strip_mod = :\n+\n+endif\n+\n # Use filechk to avoid rebuilds when a header changes, but the resulting file\n # does not\n define filechk_offsets\ndiff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst\nindex 68708a039a62..b95f613e23c8 100644\n--- a/scripts/Makefile.modinst\n+++ b/scripts/Makefile.modinst\n@@ -8,6 +8,7 @@ __modinst:\n \n include $(objtree)/include/config/auto.conf\n include $(srctree)/scripts/Kbuild.include\n+include $(srctree)/scripts/Makefile.lib\n \n install-y :=\n \n@@ -36,7 +37,7 @@ install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo)\n install-$(CONFIG_BUILTIN_MODULE_RANGES) += $(MODLIB)/modules.builtin.ranges\n \n $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.ranges): $(MODLIB)/%: % FORCE\n-\t$(call cmd,install)\n+\t$(call cmd,install_mod)\n \n endif\n \n@@ -65,40 +66,12 @@ install-$(CONFIG_MODULES) += $(modules)\n __modinst: $(install-y)\n \t@:\n \n-#\n-# Installation\n-#\n-quiet_cmd_install = INSTALL $@\n-      cmd_install = cp $< $@\n-\n-# Strip\n-#\n-# INSTALL_MOD_STRIP, if defined, will cause modules to be stripped after they\n-# are installed. If INSTALL_MOD_STRIP is '1', then the default option\n-# --strip-debug will be used. Otherwise, INSTALL_MOD_STRIP value will be used\n-# as the options to the strip command.\n-ifdef INSTALL_MOD_STRIP\n-\n ifdef CONFIG_MODULE_HASHES\n ifeq ($(KBUILD_EXTMOD),)\n+ifdef INSTALL_MOD_STRIP\n $(error CONFIG_MODULE_HASHES and INSTALL_MOD_STRIP are mutually exclusive)\n endif\n endif\n-\n-ifeq ($(INSTALL_MOD_STRIP),1)\n-strip-option := --strip-debug\n-else\n-strip-option := $(INSTALL_MOD_STRIP)\n-endif\n-\n-quiet_cmd_strip = STRIP   $@\n-      cmd_strip = $(STRIP) $(strip-option) $@\n-\n-else\n-\n-quiet_cmd_strip =\n-      cmd_strip = :\n-\n endif\n \n #\n@@ -131,8 +104,8 @@ endif\n $(foreach dir, $(sort $(dir $(install-y))), $(shell mkdir -p $(dir)))\n \n $(dst)/%.ko: %.ko FORCE\n-\t$(call cmd,install)\n-\t$(call cmd,strip)\n+\t$(call cmd,install_mod)\n+\t$(call cmd,strip_mod)\n \t$(call cmd,sign)\n \n ifdef CONFIG_MODULES\n","prefixes":["v5","13/14"]}