From: Colin Watson <cjwatson@debian.org>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: Michael Chang <mchang@suse.com>,
Marco A Benatto <mbenatto@redhat.com>,
Javier Martinez Canillas <javierm@redhat.com>,
Daniel Kiper <daniel.kiper@oracle.com>
Subject: Re: [PATCH] i386-pc: build verifiers API as module
Date: Thu, 18 Mar 2021 09:23:40 +0000 [thread overview]
Message-ID: <20210318092340.GA18653@riva.ucam.org> (raw)
In-Reply-To: <20210318071434.2814-1-mchang@suse.com>
On Thu, Mar 18, 2021 at 03:14:34PM +0800, Michael Chang via Grub-devel wrote:
> 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 exploading on some i386-pc system with very short MBR gap
> size. See also a very comprehensive summary from Colin [1] about the
> details.
Thanks for working on this! It's certainly awkward to have to deal with
this sort of thing, but apparently not as awkward as I'd feared, and
it's better than the alternative.
> +AM_CONDITIONAL([COND_NOT_i386_pc], [test x$target_cpu != xi386 -o x$platform != xpc])
You could drop this and instead just do "if !COND_i386_pc" in
grub-core/Makefile.am.
> diff --git a/grub-core/kern/verifiers.c b/grub-core/kern/verifiers.c
> index 75d7994cf..85887917d 100644
> --- a/grub-core/kern/verifiers.c
> +++ b/grub-core/kern/verifiers.c
> @@ -221,8 +221,19 @@ grub_verify_string (char *str, enum grub_verify_string_type type)
> return GRUB_ERR_NONE;
> }
>
> +#ifdef GRUB_MACHINE_PCBIOS
> +GRUB_MOD_INIT(verifiers)
> +#else
> void
> grub_verifiers_init (void)
> +#endif
I think a comment here (or somewhere in the actual code, anyway, I don't
mind where) would be useful so that people trying to work out what's
going on don't have to hunt through commit logs to find out.
If these minor comments are fixed:
Reviewed-by: Colin Watson <cjwatson@debian.org>
--
Colin Watson (he/him) [cjwatson@debian.org]
next prev parent reply other threads:[~2021-03-18 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 7:14 [PATCH] i386-pc: build verifiers API as module Michael Chang
2021-03-18 9:23 ` Colin Watson [this message]
2021-03-18 11:27 ` Michael Chang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210318092340.GA18653@riva.ucam.org \
--to=cjwatson@debian.org \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
--cc=javierm@redhat.com \
--cc=mbenatto@redhat.com \
--cc=mchang@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.