[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB
From: |
Patrick Steinhardt |
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 |
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
signature.asc
Description: PGP signature
- [PATCH v3 0/5] Support Argon2 KDF in LUKS2, Patrick Steinhardt, 2020/03/10
- [PATCH v3 2/5] types.h: add UINT-related macros needed for Argon2, Patrick Steinhardt, 2020/03/10
- [PATCH v3 4/5] luks2: Discern Argon2i and Argon2id, Patrick Steinhardt, 2020/03/10
- [PATCH v3 5/5] luks2: Support key derival via Argon2, Patrick Steinhardt, 2020/03/10
- [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup, Patrick Steinhardt, 2020/03/10