i386-pc: build verifiers API as module
authorMichael Chang <mchang@suse.com>
Thu, 18 Mar 2021 11:30:26 +0000 (19:30 +0800)
committerPeter Michael Green <plugwash@raspbian.org>
Sun, 28 Jul 2024 22:42:11 +0000 (22:42 +0000)
commitdb0e2532593a1d94bd89fd9d05284276168fe9b9
tree7a85145cd68c6542165e8d552178ff0b7154a76c
parent0f27ae902248f6bc0f6caa4e0e2eae12b8f8424c
i386-pc: build verifiers API as module

Given no core functions on i386-pc would require verifiers to work and
the only consumer of the verifier API is the pgp module, it looks good
to me that we can move the verifiers out of the kernel image and let
moddep.lst to auto-load it when pgp is loaded on i386-pc platform.

This helps to reduce the size of core image and thus can relax the
tension of exploding on some i386-pc system with very short MBR gap
size. See also a very comprehensive summary from Colin [1] about the
details.

[1] https://lists.gnu.org/archive/html/grub-devel/2021-03/msg00240.html

V2:
Drop COND_NOT_i386_pc and use !COND_i386_pc.
Add comment in kern/verifiers.c to help understanding what's going on
without digging into the commit history.

Reported-by: Colin Watson <cjwatson@debian.org>
Reviewed-by: Colin Watson <cjwatson@debian.org>
Signed-off-by: Michael Chang <mchang@suse.com>
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2021-03/msg00251.html
Bug-Debian: https://bugs.debian.org/984488
Bug-Debian: https://bugs.debian.org/985374
Last-Update: 2021-09-24

Patch-Name: pc-verifiers-module.patch

Gbp-Pq: Name pc-verifiers-module.patch
grub-core/Makefile.am
grub-core/Makefile.core.def
grub-core/kern/main.c
grub-core/kern/verifiers.c
include/grub/verify.h