* [PATCH] builddeb: fix missing modules signatures if debug info is enabled
@ 2015-01-29 10:15 Andrey Skvortsov
0 siblings, 0 replies; only message in thread
From: Andrey Skvortsov @ 2015-01-29 10:15 UTC (permalink / raw)
To: Michal Marek, linux-kbuild, linux-kernel; +Cc: Andrey Skvortsov
If CONFIG_DEBUG_INFO is set, builddeb creates separate package with
debug information. To do that, debug information from all of the modules
is placed into separate file and is stripped from loadable modules by objcopy.
If CONFIG_MODULE_SIG_ALL was set, then after stripping all modules'
signatures are gone. If at the same time CONFIG_MODULE_SIG_FORCE is set,
then result package with contains non-loadable modules.
This patch resign all stripped modules again to avoid any such problems.
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---
scripts/package/builddeb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 88dbf23..977c4d7 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -162,6 +162,12 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
# then add a link to those
$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
done
+
+ # resign stripped modules
+ MODULE_SIG_ALL="$(grep -s '^CONFIG_MODULE_SIG_ALL=y' $KCONFIG_CONFIG || true)"
+ if [ -n "$MODULE_SIG_ALL" ]; then
+ INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_sign
+ fi
fi
fi
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-29 10:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 10:15 [PATCH] builddeb: fix missing modules signatures if debug info is enabled Andrey Skvortsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).