diff options
| author | Mikhail Malyshev <mike.malyshev@gmail.com> | 2025-10-15 16:34:52 +0000 |
|---|---|---|
| committer | Nicolas Schier <nsc@kernel.org> | 2025-11-08 12:17:58 +0100 |
| commit | af61da281f52aba0c5b090bafb3a31c5739850ff (patch) | |
| tree | b4ea2231e199e113408462ae44afe0066283fa08 /tools/lib/python/jobserver.py | |
| parent | d599f571b3b42df1a4643531e27a262260296b86 (diff) | |
kbuild: Use objtree for module signing key path
When building out-of-tree modules with CONFIG_MODULE_SIG_FORCE=y,
module signing fails because the private key path uses $(srctree)
while the public key path uses $(objtree). Since signing keys are
generated in the build directory during kernel compilation, both
paths should use $(objtree) for consistency.
This causes SSL errors like:
SSL error:02001002:system library:fopen:No such file or directory
sign-file: /kernel-src/certs/signing_key.pem
The issue occurs because:
- sig-key uses: $(srctree)/certs/signing_key.pem (source tree)
- cmd_sign uses: $(objtree)/certs/signing_key.x509 (build tree)
But both keys are generated in $(objtree) during the build.
This complements commit 25ff08aa43e37 ("kbuild: Fix signing issue for
external modules") which fixed the scripts path and public key path,
but missed the private key path inconsistency.
Fixes out-of-tree module signing for configurations with separate
source and build directories (e.g., O=/kernel-out).
Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20251015163452.3754286-1-mike.malyshev@gmail.com
Signed-off-by: Nicolas Schier <nsc@kernel.org>
Diffstat (limited to 'tools/lib/python/jobserver.py')
0 files changed, 0 insertions, 0 deletions
