Skip to content
Snippets Groups Projects
Commit df5b9376 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

Preserve ABI whether the module signing support is enabled or not


When disabling module signing support, the `sig_ok` field of
`struct module` is dropped. This causes the CRC in `Modules.symvers`
for each symbol accepting a `struct module` to change, since
`genksyms` derives the CRC by recursively checking the definition
of each parameter.

This in turn means that when disabling modules signing support the
debian package build fails because the CRC checked by the ABI step
in `buildcheck.py` won't match the reference.

By making the inclusion of the `sig_ok` symbol unconditional the ABI
is now preserved.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 207416b0
No related branches found
No related tags found
1 merge request!5Preserve ABI whether the module signing support is enabled or not
From: Emanuele Aina <emanuele.aina@collabora.com>
Date: Wed, 11 Sep 2019 09:04:59 +0200
Subject: Preserve ABI whether the module signing support is enabled or not
When disabling module signing support, the `sig_ok` field of
`struct module` is dropped. This causes the CRC in `Modules.symvers`
for each symbol accepting a `struct module` to change, since
`genksyms` derives the CRC by recursively checking the definition
of each parameter.
This in turn means that when disabling modules signing support the
debian package build fails because the CRC checked by the ABI step
in `buildcheck.py` won't match the reference.
By making the inclusion of the `sig_ok` symbol unconditional the ABI
is now preserved.
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
---
include/linux/module.h | 2 --
kernel/module.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/module.h b/include/linux/module.h
index 904f946..ff2ce7e 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -372,10 +372,8 @@ struct module {
const s32 *unused_gpl_crcs;
#endif
-#ifdef CONFIG_MODULE_SIG
/* Signature was verified. */
bool sig_ok;
-#endif
bool async_probe_requested;
diff --git a/kernel/module.c b/kernel/module.c
index 871cc9a..a5bc1ac 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2799,6 +2799,7 @@ static int module_sig_check(struct load_info *info, int flags,
static int module_sig_check(struct load_info *info, int flags,
bool can_do_ima_check)
{
+ info->sig_ok = true;
return 0;
}
#endif /* !CONFIG_MODULE_SIG */
......@@ -295,3 +295,6 @@ rpi/ARM-dts-add-Raspberry-Pi-Compute-Module-3-and-IO-boa.patch
# Apertis support/fixes for sabre ai audio
apertis/sabreai-audio/0001-cs42xx8-i2c-Fix-module-auto-loading.patch
apertis/sabreai-audio/0002-Hack-hardcode-to-sample-rates-usable-on-sabre-AI.patch
# Apertis misc
apertis/preserve-abi-with-modsig-disabled.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment