Re: v6.13-rc1: Module signing stopped working for external modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09.01.25 07:35, Torsten Hilbrich wrote:
Hello,

after testing v6.13-rc1 after successfully using v6.12 I noticed that our external modules are no longer building correctly.

- Module source: /build/client/devel/addmodules/vtx/work/vtx
- Kernel source: /build/client/devel/kernel/work/linux-2.6
   Symlinked by build-source

We run the module_install step:

----------------
make -C build-source M=/build/client/devel/addmodules/vtx/work/vtx modules_install INSTALL_MOD_PATH=/build/client/devel/addmodules/vtx/_ INSTALL_MOD_DIR=extra
make[5]: Entering directory '/build/client/devel/kernel/work/linux-2.6'
make[6]: Entering directory '/build/client/devel/addmodules/vtx/work/vtx'
  INSTALL /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+/extra/vtx.ko   SIGN /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+/extra/vtx.ko
/bin/sh: 1: scripts/sign-file: not found
   DEPMOD  /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+
make[6]: Leaving directory '/build/client/devel/addmodules/vtx/work/vtx'
make[5]: Leaving directory '/build/client/devel/kernel/work/linux-2.6'
----------------> The problem here is that before calling cmd_sign (scripts/sign-file) the build system now changes to the module source.

As workaround I used the following modification:

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index 6fa9af4a25b4..67f081a68364 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -105,7 +105,7 @@ else
 sig-key := $(CONFIG_MODULE_SIG_KEY)
 endif
 quiet_cmd_sign = SIGN    $@
-      cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) "$(sig-key)" certs/signing_key.x509 $@ \
+      cmd_sign = $(srctree)/scripts/sign-file $(CONFIG_MODULE_SIG_HASH) "$(sig-key)" $(srctree)/certs/signing_key.x509 $@ \
                  $(if $(KBUILD_EXTMOD),|| true)
ifeq ($(sign-only),)

I first fixed the sign-file invocation, then I got errors like the following:

  SIGN    /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+/extra/vtx.ko
At main.c:189:
- SSL error:FFFFFFFF80000002:system library::No such file or directory: crypto/bio/bss_file.c:67
- SSL error:10000080:BIO routines::no such file: crypto/bio/bss_file.c:75
sign-file: certs/signing_key.x509
  DEPMOD  /build/client/devel/addmodules/vtx/_/lib/modules/6.13.0-devel+

Adding $(srctree) for both the program and the signing key fixed the issue.

I assume the root issue is a different beast but I was not able to find it.

Thanks,

	Torsten





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux