All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: Leif Lindholm <leif@nuviainc.com>,
	grub-devel@gnu.org, agraf@csgraf.de, pjones@redhat.com,
	mjg59@google.com, phcoder@gmail.com,
	Milan Broz <gmazyland@gmail.com>
Subject: Re: [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB
Date: Sun, 15 Mar 2020 15:01:05 +0100	[thread overview]
Message-ID: <20200315140105.GA4662@ncase> (raw)
In-Reply-To: <20200313135946.cwfyzbmjkw2yy5q4@tomti.i.net-space.pl>

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

On Fri, Mar 13, 2020 at 02:59:46PM +0100, Daniel Kiper wrote:
> Patrick, please make Argon2 functionality enabled/disabled by the
> ./configure. By default it have to be disabled. Additionally, please add
> to the grub-dev.texi an explanation what is the impact of enabling Argon2.

Is there any obvious way to conditionally build modules and libs into
the kernel based on a feature flag? The only way I see it to be doable
is by re-using groups as known by gentpl.py, so that I may do the
following:

# Makefile.util.def

    library = {
      name = libgrubkern.a;
      cflags = '$(CFLAGS_GNULIB)';
      cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json';
      argon2_cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json -I$(srcdir)/grub-core/lib/argon2';

      common = util/misc.c;
      common = grub-core/kern/command.c;
      common = grub-core/kern/device.c;
      ...

      argon2 = grub-core/lib/argon2/argon2.c;
      argon2 = grub-core/lib/argon2/core.c;
      argon2 = grub-core/lib/argon2/ref.c;
      argon2 = grub-core/lib/argon2/blake2/blake2b.c;
    };

# grub-core/Makefile.core.def

    module = {
      name = argon2;
      common = lib/argon2/argon2.c;
      common = lib/argon2/core.c;
      common = lib/argon2/ref.c;
      common = lib/argon2/blake2/blake2b.c;
      enable = argon2;
    };

    module = {
      name = luks2;
      common = disk/luks2.c;
      common = lib/gnulib/base64.c;
      cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
      cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json';
      argon2_cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json -I$(srcdir)/lib/argon2';
    };

I don't think that gentpl.py is currently able to act based on configure
options, but only decides by build platforms. Please let me know I'm
missing the bigger picture here, and if there's any module that already
does that kind of stuff that'd be a great help.

Patrick

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-03-15 14:01 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 18:58 [PATCH v3 0/5] Support Argon2 KDF in LUKS2 Patrick Steinhardt
2020-03-10 18:58 ` [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB Patrick Steinhardt
2020-03-13 12:42   ` Daniel Kiper
2020-03-13 12:55   ` Leif Lindholm
2020-03-13 13:59     ` Daniel Kiper
2020-03-15 14:01       ` Patrick Steinhardt [this message]
2020-03-15 10:14     ` Patrick Steinhardt
2020-03-15 10:41     ` Patrick Steinhardt
2020-03-10 18:58 ` [PATCH v3 2/5] types.h: add UINT-related macros needed for Argon2 Patrick Steinhardt
2020-03-13 12:49   ` Daniel Kiper
2020-03-10 18:58 ` [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup Patrick Steinhardt
2020-03-10 20:44   ` Eli Schwartz
2020-03-10 21:42     ` Patrick Steinhardt
2020-03-13 13:13   ` Daniel Kiper
2020-03-16 17:21     ` Daniel Kiper
2020-03-16 17:52       ` Patrick Steinhardt
2020-03-16 20:03         ` Daniel Kiper
2020-03-17  5:51           ` Patrick Steinhardt
2020-03-17 10:45             ` Leif Lindholm
2020-03-16 19:57       ` Konrad Rzeszutek Wilk
2020-03-18 11:52         ` Patrick Steinhardt
2021-01-19  0:07   ` Petr Vorel
2021-01-19 11:10     ` Dmitry
2021-01-19 13:06       ` Petr Vorel
2021-01-19 15:42         ` Matt Turner
2021-01-19 19:03         ` Patrick Steinhardt
2021-01-19 19:31           ` Petr Vorel
2021-01-21 14:49             ` IS: GRUB release cycle: WAS: " Daniel Kiper
2021-01-21 21:30               ` Petr Vorel
2021-01-26 13:00                 ` Daniel Kiper
2021-01-26 19:57                   ` Petr Vorel
2021-08-08 13:58   ` [PATCH v4 0/5] Support Argon2 KDF in LUKS2 Patrick Steinhardt
2021-08-08 13:58     ` [PATCH v4 1/5] kern: dl: Allow modules under CC0 license Patrick Steinhardt
2021-08-08 15:03       ` Petr Vorel
2021-08-08 13:58     ` [PATCH v4 2/5] types.h: Add UINT-related macros needed for Argon2 Patrick Steinhardt
2021-08-08 13:58     ` [PATCH v4 3/5] argon2: Import reference implementation of Argon2 Patrick Steinhardt
2021-08-08 13:58     ` [PATCH v4 4/5] luks2: Discern Argon2i and Argon2id Patrick Steinhardt
2021-08-08 13:59     ` [PATCH v4 5/5] luks2: Support key derival via Argon2 Patrick Steinhardt
2020-03-10 18:58 ` [PATCH v3 4/5] luks2: Discern Argon2i and Argon2id Patrick Steinhardt
2020-03-10 18:58 ` [PATCH v3 5/5] luks2: Support key derival via Argon2 Patrick Steinhardt
2020-03-25 17:12 ` [PATCH v3 0/5] Support Argon2 KDF in LUKS2 Daniel Kiper

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=20200315140105.GA4662@ncase \
    --to=ps@pks.im \
    --cc=agraf@csgraf.de \
    --cc=dkiper@net-space.pl \
    --cc=gmazyland@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=leif@nuviainc.com \
    --cc=mjg59@google.com \
    --cc=phcoder@gmail.com \
    --cc=pjones@redhat.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.