i386-pc: build verifiers API as module
authorMichael Chang <mchang@suse.com>
Thu, 18 Mar 2021 11:30:26 +0000 (19:30 +0800)
committerFelix Zielcke <fzielcke@z-51.de>
Mon, 15 Jul 2024 15:05:20 +0000 (17:05 +0200)
commitca7df04b722101231dd32e40b28be367c9c74edd
tree11d468e02db6ae557fa38e1778438615345e1f8e
parent5d11a9fd635992991416b0d509fd107983b7fa0c
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