[PATCH] Warn if MBR gap is small and user uses advanced modules

2020-03-10 Thread Vladimir 'phcoder' Serbinenko
Daniel, do you want to adjust the whitelist? We don't want to support small MBR gap in pair with anything but the simplest config of biosdisk+part_msdos+simple filesystem. In this path "simple filesystems" are all current filesystems except zfs and btrfs --- grub-core/partmap/gpt.c | 9 +

Re: [PATCH] Warn if MBR gap is small and user uses advanced modules

2020-03-10 Thread Mihai Moldovan
* On 3/10/20 1:23 PM, Vladimir 'phcoder' Serbinenko wrote: > [...] > diff --git a/include/grub/util/install.h b/include/grub/util/install.h > index 2631b1074..982115f57 100644 > --- a/include/grub/util/install.h > +++ b/include/grub/util/install.h > @@ -193,13 +193,13 @@ grub_util_bios_setup (const

[PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB

2020-03-10 Thread Patrick Steinhardt
By default, GRUB will allocate a quarter of the pages it got available in the EFI subsystem. On many current systems, this will amount to roughly 800MB of RAM assuming an address space of 32 bits. This is plenty for most use cases, but it doesn't suffice when using full disk encryption with a key d

[PATCH v3 2/5] types.h: add UINT-related macros needed for Argon2

2020-03-10 Thread Patrick Steinhardt
For the upcoming import of the Argon2 library, we need the macros GRUB_UINT32_MAX, GRUB_UINT32_C and GRUB_UINT64_C. Add them as a preparatory step. Signed-off-by: Patrick Steinhardt --- include/grub/types.h | 8 1 file changed, 8 insertions(+) diff --git a/include/grub/types.h b/includ

[PATCH v3 0/5] Support Argon2 KDF in LUKS2

2020-03-10 Thread Patrick Steinhardt
Hi, this is the third version of my patchset to support the Argon2 KDF in LUKS2. The following things have changed in comparison to v2: - Improved the GRUB_UINT_C macros to not use `elif 1` and fixed indentation. - Dropped the upstreamed patch to fix a missing newline. - Rewor

[PATCH v3 4/5] luks2: Discern Argon2i and Argon2id

2020-03-10 Thread Patrick Steinhardt
While GRUB is already able to parse both Argon2i and Argon2id parameters from the LUKS2 header, it doesn't discern both types. This commit introduces a new KDF type for Argon2id and sets up the parsed KDF's type accordingly. Signed-off-by: Patrick Steinhardt Reviewed-by: Daniel Kiper --- grub-c

[PATCH v3 3/5] argon2: Import Argon2 from cryptsetup

2020-03-10 Thread Patrick Steinhardt
In order to support the Argon2 key derival function for LUKS2, we obviously need to implement Argon2. It doesn't make a lot of sense to hand-code any crypto, which is why this commit instead imports Argon2 from the cryptsetup project. This commit thus imports the code from the official reference im

[PATCH v3 5/5] luks2: Support key derival via Argon2

2020-03-10 Thread Patrick Steinhardt
One addition with LUKS2 was support of the key derival function Argon2 in addition to the previously supported PBKDF2 algortihm. In order to ease getting in initial support for LUKS2, we only reused infrastructure to support LUKS2 with PBKDF2, but left out Argon2. This commit now introduces suppor

Re: [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup

2020-03-10 Thread Eli Schwartz
On 3/10/20 2:58 PM, Patrick Steinhardt wrote: > In order to support the Argon2 key derival function for LUKS2, we > obviously need to implement Argon2. It doesn't make a lot of sense to > hand-code any crypto, which is why this commit instead imports Argon2 > from the cryptsetup project. This commi

Re: [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup

2020-03-10 Thread Patrick Steinhardt
On Tue, Mar 10, 2020 at 04:44:11PM -0400, Eli Schwartz wrote: > On 3/10/20 2:58 PM, Patrick Steinhardt wrote: > > In order to support the Argon2 key derival function for LUKS2, we > > obviously need to implement Argon2. It doesn't make a lot of sense to > > hand-code any crypto, which is why this c