Lo!
On 10.12.2015 20:59, Josh Boyer wrote(¹):
[…] Thinking about it some, there isn't really a reason CONFIG_MODULE_SIG couldn't be enabled on other architectures. Signed modules are independent of UEFI secure boot support. If we did that, we might want to come up with something that maps arches which have it enabled to a single RPM macro.
Anyway, that's likely future work.
Find attached two patches to go down that route.
The first creates a new macro in the spec file to make "signing modules" and "signing kernels for UEFI secure boot" independent from each other. This is pretty straightforward and could be applied as is, as afterwards it if more obvious what happens. I fired a scratch build to verify mod-sign and pesign are still called just like before on %{ix86} x86_64. Results can be found via http://koji.fedoraproject.org/koji/taskinfo?taskID=12376294 The arm build log shows that mod-sign and pesign are still not called.
The second patch enables module signing for all archs. Scratch builds for primary archs: http://koji.fedoraproject.org/koji/taskinfo?taskID=12376883 Scratch build for ppc: http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3033583 I for now didn't run any of those kernels to verify if things still work as I'm unsure what we want to do (hence the RFC in the Subject): On which archs do we want to enable module signing? Are there any reasons to not enable it on some archs? Is the overhead considered to big for armv7? Does it work everywhere?
My current stance to those questions: If there are no good reasons to not use module signing on some archs simply enable it everywhere.
Cu thl
(¹) that was in https://lists.fedoraproject.org/archives/list/kernel%40lists.fedoraproject.o...
On 02.01.2016 11:48, Thorsten Leemhuis wrote:
On 10.12.2015 20:59, Josh Boyer wrote(¹):
[…]
Find attached two patches to go down that route.
Here they are inline -- they were attached, but mailman removed them afaics :-/ Sorry
From 75a2022f3b326e04897165d0eb8b7a15d07ecd1e Mon Sep 17 00:00:00 2001 From: Thorsten Leemhuis fedora@leemhuis.info Date: Fri, 1 Jan 2016 17:28:51 +0100 Subject: [PATCH 1/2] add signkernel macro to make signing kernel and signing modules independent from each other
--- kernel.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/kernel.spec b/kernel.spec index e0af033..a56f071 100644 --- a/kernel.spec +++ b/kernel.spec @@ -11,9 +11,11 @@ Summary: The Linux kernel # Sign modules on x86. Make sure the config files match this setting if more # architectures are added. %ifarch %{ix86} x86_64 +%global signkernel 1 %global signmodules 1 %global zipmodules 1 %else +%global signkernel 0 %global signmodules 0 %global zipmodules 0 %endif @@ -393,7 +395,7 @@ BuildRequires: rpm-build, elfutils BuildRequires: openssl openssl-devel %endif
-%if %{signmodules} +%if %{signkernel} BuildRequires: pesign >= 0.10-4 %endif
@@ -1321,7 +1323,7 @@ BuildKernel() { make -s mrproper cp configs/$Config .config
- %if %{signmodules} + %if %{signkernel}%{signmodules} cp %{SOURCE11} certs/. %endif
@@ -1358,7 +1360,7 @@ BuildKernel() { cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || : cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/lib/modules/$KernelVer/zImage.stub-$KernelVer || : fi - %if %{signmodules} + %if %{signkernel} # Sign the image if we're using EFI %pesign -s -i $KernelImage -o vmlinuz.signed if [ ! -s vmlinuz.signed ]; then @@ -2062,6 +2064,10 @@ fi # # %changelog +* Fri Jan 01 2016 Thorsten Leemhuis fedora@leemhuis.info +- add signkernel macro to make signing kernel and signing modules + independent from each other + * Sun Dec 27 2015 Peter Robinson pbrobinson@fedoraproject.org - Minor ARMv7/aarch64/ppc/s390 config cleanups - Enable rk3368 aarch64 platforms
kernel@lists.fedoraproject.org