Re: State of Argon2 support

2024-01-26 Thread Patrick Steinhardt
On Fri, Jan 26, 2024 at 03:18:57AM -0500, Nikolaos Chatzikonstantinou wrote: > On Thu, Jan 25, 2024 at 1:15 PM Daniel Kiper wrote: > > > > Adding Vladimir who knows GRUB history better than I... > > > > On Wed, Jan 24, 2024 at 01:23:55AM -0500, Nikolaos Chatzikonstantinou wrote: > > > > [...] > >

Re: State of Argon2 support

2024-01-01 Thread Patrick Steinhardt
On Fri, Dec 22, 2023 at 09:43:35PM -0600, Oskari Pirhonen wrote: > On Fri, Dec 22, 2023 at 12:29:22 -0500, Nikolaos Chatzikonstantinou wrote: > > 2. libgcrypt does not have support for Argon2. Possible solution is to > > use the reference implementation, licensed under CC0. This is bringing > > up

Re: PATCHES: argon2 key derivation for luks2

2023-11-11 Thread Patrick Steinhardt
p;id=1c7932d90f1f62d0fd5485c5eb8ad79fa4c2f50d > > > > > > nicholas johnson (https://nicholasjohnson.ch/) contacted me telling me > > > he'd re-adapted the code for grub 2.12, on top of the rc1 tag. i then > > > started using it in libreboot's grub. >

Re: [PATCH] disk/cryptodisk: Fix missing change when updating to use grub_uuidcasecmp

2023-08-27 Thread Patrick Steinhardt
On Fri, Aug 18, 2023 at 12:27:22PM -0500, Glenn Washburn wrote: > This was causing the cryptomount command to return failure even though > the crypto device was successfully added. Of course, this meant that any > script using the return code would behave unexpectedly. > > Fixes: 3cf2e848bc03 (dis

Re: [PATCH v4 2/2] mm: Preallocate some space when adding new regions

2023-01-17 Thread Patrick Steinhardt
f (grub_add (size + align, GRUB_MM_MGMT_OVERHEAD, &grow)) > goto fail; > > + /* Preallocate some extra space if heap growth is small. */ > + grow = grub_max (grow, GRUB_MM_HEAP_GROW_EXTRA); > + >/* Align up heap growth to make it friendly to CPU/MMU. */ >if

Re: [PATCH v4 1/2] mm: Adjust new region size to take management overhead into account

2023-01-17 Thread Patrick Steinhardt
GION_CONSECUTIVE) == > GRUB_ERR_NONE) > goto again; > >/* fallthrough */ > @@ -462,7 +520,7 @@ grub_memalign (grub_size_t align, grub_size_t size) > * Try again even if this fails, in case it was able to partially > * satisfy the request > */ > - grub_mm_add_region_fn (size, GRUB_MM_ADD_REGION_NONE); > + grub_mm_add_region_fn (grow, GRUB_MM_ADD_REGION_NONE); >goto again; > } Regardless of the one grammar fix: Reviewed-by: Patrick Steinhardt Patrick signature.asc Description: PGP signature ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH 0/4] LUKS1/2 testing in fs-tester and LUKS2 support in grub-probe

2023-01-13 Thread Patrick Steinhardt
ated LUKS2 cryptodisk mount > from DM parameters > https://lists.gnu.org/archive/html/grub-devel/2022-07/msg00038.html > 4: [PATCH v4] grub-fs-tester: Add luks1 and luks2 support > https://lists.gnu.org/archive/html/grub-devel/2022-06/msg00127.html For all patches:

Re: [PATCH 3/4] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters

2023-01-13 Thread Patrick Steinhardt
On Thu, Jan 12, 2023 at 05:05:09PM -0600, Glenn Washburn wrote: > From: Josselin Poiret > > This lets a LUKS2 cryptodisk have its cipher and hash filled out, > otherwise they wouldn't be initialized if cheat mounted. > > Signed-off-by: Josselin Poiret > Tested-by: Glenn Washburn > --- > grub-

Re: [PATCH 0/6] Cryptomount testing

2023-01-13 Thread Patrick Steinhardt
On Thu, Jan 12, 2023 at 05:23:24PM +0100, Daniel Kiper wrote: > On Tue, Jan 10, 2023 at 04:08:54PM -0600, Glenn Washburn wrote: > > This patch series adds a variety of functional cryptomount LUKS1/2 tests by > > creating a LUKS container on the host and verifying that data inside can be > > read ac

Re: GRUB 2.12 release - update

2022-11-21 Thread Patrick Steinhardt
On Tue, Nov 22, 2022 at 10:46:45AM +0800, Michael Chang via Grub-devel wrote: > Dear Daniel, > > On Wed, Oct 26, 2022 at 04:52:09PM +0200, Daniel Kiper wrote: > > Hi, > > > > We are getting closer to the 2.12 release. Sadly we still do not have > > many of important patch sets in the tree. So, I

Re: [PATCH v2] grub-core/disk/cryptodisk.c: Fix unintentional integer overflow

2022-10-15 Thread Patrick Steinhardt
size_t) 1. > > Fixes: CID 307788 > > Signed-off-by: Alec Brown Reviewed-by: Patrick Steinhardt > --- > > There was a mistake in v1 of the commit message describing the issue in the > code. This version fixes the commit message so that it's accurate. > > gru

Re: [RFC PATCH v3 2/2] mm: Separate different types of allocations into different regions

2022-10-15 Thread Patrick Steinhardt
On Thu, Oct 13, 2022 at 09:29:19AM +0800, Zhang Boyang wrote: > This patch add type infomation to heap regions. Currently there are four > types: GRUB_MM_SIZE_SMALL, GRUB_MM_SIZE_LARGE, GRUB_MM_CLASS_DATA, > GRUB_MM_CLASS_MODULE. Each heap region can have its own mask of > acceptable memory allocat

Re: [RFC PATCH v3 1/2] mm: Try invalidate disk caches last when out of memory

2022-10-15 Thread Patrick Steinhardt
nvalidate_all (); > + count++; > + goto again; > + > default: >break; > } > -- > 2.30.2 > Reviewed-by: Patrick Steinhardt signature.asc Description: PGP signature ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH] efi: Increase default memory allocation to 32MB

2022-09-25 Thread Patrick Steinhardt
On Thu, Sep 22, 2022 at 05:59:34PM +0200, Daniel Kiper wrote: > Adding some folks who may be interested in this thing too... > > On Tue, Sep 20, 2022 at 12:30:30AM +1000, Daniel Axtens wrote: > > We have multiple reports of things being slower with a 1MB initial static > > allocation, and a report

Re: [PATCH v2 1/1] mm: Better handling of adding new regions

2022-09-25 Thread Patrick Steinhardt
On Tue, Sep 13, 2022 at 01:49:52AM +0800, Zhang Boyang wrote: > The code of dynamically adding new regions has two problems. First, it > always invalidate disk caches, which decreases performance severely. > Second, it request exactly "size" bytes for new region, ignoring region > management overhe

Re: [PATCH v6 2/2] cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner

2022-09-06 Thread Patrick Steinhardt
On Tue, Aug 30, 2022 at 03:12:36PM -0500, Glenn Washburn wrote: > On Mon, 29 Aug 2022 07:38:24 +0200 > Patrick Steinhardt wrote: > > > On Fri, Aug 19, 2022 at 06:06:15PM -0500, Glenn Washburn wrote: > > > A user can now specify UUID strings with dashes, instead of

Re: [PATCH v6 2/2] cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner

2022-08-28 Thread Patrick Steinhardt
On Fri, Aug 19, 2022 at 06:06:15PM -0500, Glenn Washburn wrote: > A user can now specify UUID strings with dashes, instead of having to remove > dashes. This is backwards-compatability preserving and also fixes a source > of user confusion over the inconsistency with how UUIDs are specified > betwe

Re: [PATCH] luks2: Continue trying all keyslots even if there are some failures

2022-08-20 Thread Patrick Steinhardt
On Fri, Aug 19, 2022 at 04:10:44PM +0200, Daniel Kiper wrote: > On Mon, Aug 15, 2022 at 05:23:15PM +0200, Patrick Steinhardt wrote: > > On Fri, Jul 22, 2022 at 03:04:50AM -0500, Glenn Washburn wrote: > > > luks2_get_keyslot can fail for a variety of reasons that do not

[PATCH v6 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-08-15 Thread Patrick Steinhardt
Afdal Reviewed-by: Daniel Kiper Signed-off-by: Patrick Steinhardt --- grub-core/disk/luks2.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c index bf741d70f..32cc8c6cb 100644 --- a/grub-core/disk/lu

[PATCH v6 1/2] json: Add function to unescape JSON-encoded strings

2022-08-15 Thread Patrick Steinhardt
nctionality for ourselves. Add a new function `grub_json_unescape ()` that takes a potentially escaped JSON string as input and returns a new unescaped string. Reviewed-by: Daniel Kiper Signed-off-by: Patrick Steinhardt --- grub-core/lib/json/json.c | 118 +

[PATCH v6 0/2] luks2: Fix decoding of digests and salts with escaped chars

2022-08-15 Thread Patrick Steinhardt
ut and returns a new unescaped string. +Reviewed-by: Daniel Kiper Signed-off-by: Patrick Steinhardt ## grub-core/lib/json/json.c ## 2: 60ccd669d ! 2: 16ae4ef05 luks2: Fix decoding of digests and salts with escaped chars @@ Commit message that handl

Re: [PATCH v5 1/2] json: Add function to unescape JSON-encoded strings

2022-08-15 Thread Patrick Steinhardt
On Tue, Jul 12, 2022 at 03:39:13PM +0200, Daniel Kiper wrote: > On Mon, Jul 11, 2022 at 09:08:09AM -0400, Nicholas Vinson wrote: > > On 7/11/22 06:44, Patrick Steinhardt wrote: > > > JSON strings require certain characters to be encoded, either by using a > > > singl

Re: [PATCH v5 2/2] cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner

2022-08-15 Thread Patrick Steinhardt
On Thu, Aug 11, 2022 at 12:48:43PM -0500, Glenn Washburn wrote: > A user can now specify UUID strings with dashes, instead of having to remove > dashes. This is backwards-compatability preserving and also fixes a source > of user confusion over the inconsistency with how UUIDs are specified > betwe

Re: [PATCH] luks2: Continue trying all keyslots even if there are some failures

2022-08-15 Thread Patrick Steinhardt
grub_dprintf ("luks2", "Ignoring unhandled error %d from > luks2_get_keyslot\n", grub_errno); > > -- > 2.34.1 > Reviewed-by: Patrick Steinhardt signature.asc Description: PGP signature ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH v5 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-07-12 Thread Patrick Steinhardt
On Tue, Jul 12, 2022 at 03:30:22PM +0200, Daniel Kiper wrote: > On Mon, Jul 11, 2022 at 12:44:59PM +0200, Patrick Steinhardt wrote: > > It was reported in the #grub IRC channel on Libera that decryption of > > LUKS2 partitions fails with errors about invalid digests and/or salts

[PATCH v5 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-07-11 Thread Patrick Steinhardt
Afdal Signed-off-by: Patrick Steinhardt --- grub-core/disk/luks2.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c index bf741d70f..c24c6e98d 100644 --- a/grub-core/disk/luks2.c +++ b/grub-core/disk/lu

[PATCH v5 1/2] json: Add function to unescape JSON-encoded strings

2022-07-11 Thread Patrick Steinhardt
nctionality for ourselves. Add a new function `grub_json_unescape ()` that takes a potentially escaped JSON string as input and returns a new unescaped string. Signed-off-by: Patrick Steinhardt --- grub-core/lib/json/json.c | 118 ++ grub-core/lib/json/j

[PATCH v5 0/2] luks2: Fix decoding of digests and salts with escaped chars

2022-07-11 Thread Patrick Steinhardt
this until v2.0.2. Changes compared to v4 include mostly style-related fixes pointed out by Daniel. Please refer to the range-diff below. Patrick Patrick Steinhardt (2): json: Add function to unescape JSON-encoded strings luks2: Fix decoding of digests and salts with escaped chars grub-core

Re: [PATCH v4 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-07-11 Thread Patrick Steinhardt
On Thu, Jun 30, 2022 at 06:05:12PM +0200, Daniel Kiper wrote: > On Mon, Jun 06, 2022 at 07:29:00AM +0200, Patrick Steinhardt wrote: > > It was reported in the #grub IRC channel on Libera that decryption of > > LUKS2 partitions fails with errors about invalid digests and/or salts

Re: [PATCH v2 00/15] Dynamic allocation of memory regions and IBM vTPM v2

2022-06-23 Thread Patrick Steinhardt
On Thu, Jun 23, 2022 at 07:16:04PM +0200, Daniel Kiper wrote: > Huh! For some reason I missed this email... Sorry folks about that! > > On Sun, May 29, 2022 at 07:55:00AM +0200, Patrick Steinhardt wrote: > > On Thu, May 19, 2022 at 06:34:48PM +0200, Daniel Kiper wrote: > > &

Re: [PATCH v3] disk/cryptodisk: When cheatmounting, use the sector info of the cheat device

2022-06-21 Thread Patrick Steinhardt
iling with > "error: sector sizes of 1 bytes aren't supported yet." > > Signed-off-by: Fabian Vogt Reviewed-by: Patrick Steinhardt > --- > v2: Moved new code from grub_cryptodisk_cheat_mount to grub_cryptodisk_open, > which allowed to simplify the code a bit

Re: [PATCH v2 3/3] grub-core/kern/disk.c: handle LUKS2 devices

2022-06-12 Thread Patrick Steinhardt
On Mon, Jun 06, 2022 at 12:11:39PM -0500, Glenn Washburn wrote: > On Mon, 6 Jun 2022 07:32:40 +0200 > Patrick Steinhardt wrote: > > > On Sun, Jun 05, 2022 at 01:43:18PM -0500, Glenn Washburn wrote: > > > On Sun, 29 May 2022 09:09:38 +0200 > > > Patrick Steinha

Re: [PATCH v2 3/3] grub-core/kern/disk.c: handle LUKS2 devices

2022-06-05 Thread Patrick Steinhardt
On Sun, Jun 05, 2022 at 01:43:18PM -0500, Glenn Washburn wrote: > On Sun, 29 May 2022 09:09:38 +0200 > Patrick Steinhardt wrote: > > > On Tue, May 10, 2022 at 10:55:52PM -0500, Glenn Washburn wrote: > > > On Mon, 09 May 2022 22:27:30 +0200 > > > Josselin Po

[PATCH v4 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-06-05 Thread Patrick Steinhardt
Afdal Signed-off-by: Patrick Steinhardt --- grub-core/disk/luks2.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c index bf741d70f..728f93a8c 100644 --- a/grub-core/disk/luks2.c +++ b/grub-core/disk/lu

[PATCH v4 1/2] json: Add function to unescape JSON-encoded strings

2022-06-05 Thread Patrick Steinhardt
nctionality for ourselves. Add a new function `grub_json_unescape ()` that takes a potentially escaped JSON string as input and returns a new unescaped string. Signed-off-by: Patrick Steinhardt --- grub-core/lib/json/json.c | 101 ++ grub-core/lib/json/js

[PATCH v4 0/2] luks2: Fix decoding of digests and salts with escaped chars

2022-06-05 Thread Patrick Steinhardt
lt to be less readable and more fragile when requiring the caller to pass in a buffer, and we cannot make use of it right now anyway. Thanks for your feedback! Patrick Patrick Steinhardt (2): json: Add function to unescape JSON-encoded strings luks2: Fix decoding of digests and salts with es

Re: [PATCH v3 1/2] json: Add function to unescape JSON-encoded strings

2022-06-05 Thread Patrick Steinhardt
On Sun, Jun 05, 2022 at 02:00:44PM -0500, Glenn Washburn wrote: > On Mon, 30 May 2022 18:01:01 +0200 > Patrick Steinhardt wrote: > > > JSON strings require certain characters to be encoded, either by using a > > single reverse solidus character "\" for a set o

[PATCH v3 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-05-30 Thread Patrick Steinhardt
Afdal Signed-off-by: Patrick Steinhardt --- grub-core/disk/luks2.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c index bf741d70f..623607794 100644 --- a/grub-core/disk/luks2.c +++ b/grub-core/disk/lu

[PATCH v3 1/2] json: Add function to unescape JSON-encoded strings

2022-05-30 Thread Patrick Steinhardt
nctionality for ourselves. Add a new function `grub_json_unescape ()` that takes a potentially escaped JSON string as input and returns a new unescaped string. Signed-off-by: Patrick Steinhardt --- grub-core/lib/json/json.c | 98 +++ grub-core/lib/json/j

[PATCH v3 0/2] luks2: Fix decoding of digests and salts with escaped chars

2022-05-30 Thread Patrick Steinhardt
patch series. - I've done my research and finally found out why this was only happening on Ubuntu 18.04, which uses cryptsetup v2.0.2, and documented this in the commit message. Patrick Patrick Steinhardt (2): json: Add function to unescape JSON-encoded strings luks2: Fix

Re: [PATCH v2 3/3] grub-core/kern/disk.c: handle LUKS2 devices

2022-05-29 Thread Patrick Steinhardt
On Tue, May 10, 2022 at 10:55:52PM -0500, Glenn Washburn wrote: > On Mon, 09 May 2022 22:27:30 +0200 > Josselin Poiret wrote: > > > Hello everyone, > > > > Glenn Washburn writes: > > > > > I don't really like this, but it gets the job done and is a work-around > > > for a peculiarity of the LU

Re: [PATCH v2 3/3] grub-core/kern/disk.c: handle LUKS2 devices

2022-05-28 Thread Patrick Steinhardt
On Wed, May 04, 2022 at 04:47:08PM -0500, Glenn Washburn wrote: > On Tue, 29 Mar 2022 12:31:58 +0200 > Pierre-Louis Bonicoli wrote: > > > Unlike LUKS1, the sector size of LUKS2 devices isn't hardcoded. > > > > Regarding the probe command, the following values of --target switch > > are affected:

Re: [PATCH v2 0/3] Cryptomount detached headers

2022-05-28 Thread Patrick Steinhardt
've reviewed this patch series, and except for a single nit the changes all look good to me. So please feel free to add my Reviewed-by: Patrick Steinhardt , regardless of whether you decide to apply my prosed nit in 2/3 or not. Patrick signa

Re: [PATCH v2 2/3] cryptodisk: Add support for using detached header files

2022-05-28 Thread Patrick Steinhardt
On Mon, May 16, 2022 at 04:49:47PM -0500, Glenn Washburn wrote: > Using the disk read hook mechanism, setup a read hook on the source disk > which will read from the given header file during the scan and recovery > cryptodisk backend functions. Disk read hooks are executed after the data > has been

Re: [PATCH v2 00/15] Dynamic allocation of memory regions and IBM vTPM v2

2022-05-28 Thread Patrick Steinhardt
l not be forgotten. I am waiting for some allocator > tests reports. When I get them I will merge allocator stuff and review > the rest of the code from this patch series. Sadly folks who are going > to test the code are busy with other stuff. Though I am pinging them... > > Anyway, s

Re: [PATCH 2/3] cryptodisk: Add --header option to cryptomount to support detached headers

2022-05-16 Thread Patrick Steinhardt
On Mon, May 16, 2022 at 09:26:39AM -0500, Glenn Washburn wrote: > On Sun, 15 May 2022 18:47:47 +0200 > Patrick Steinhardt wrote: > > > On Tue, May 10, 2022 at 11:53:08PM -0500, Glenn Washburn wrote: [snip] > > > + source->read_hook = cryptodisk_read_hook; > >

Re: [PATCH 0/3] Cryptomount detached headers

2022-05-15 Thread Patrick Steinhardt
On Fri, May 13, 2022 at 01:24:12PM +0200, Daniel Kiper wrote: > On Tue, May 10, 2022 at 11:53:06PM -0500, Glenn Washburn wrote: > > This patch series is, I believe, a better approach to supporting detached > > headers for cryptomount and backends. This series will probably not apply > > cleanly wit

Re: [PATCH 2/3] cryptodisk: Add --header option to cryptomount to support detached headers

2022-05-15 Thread Patrick Steinhardt
On Tue, May 10, 2022 at 11:53:08PM -0500, Glenn Washburn wrote: > Add a --header (short -H) option to cryptomount which takes a file argument. > Using the improved read hook, setup a read hook on the source device which > will read from the given header file during the scan and recovery cryptodisk

Re: [PATCH v3 0/4] Refactor/improve cryptomount data passing to crypto modules

2021-11-14 Thread Patrick Steinhardt
ched header and keyfile support (I already have > the series updated and ready to send once this is accepted). I also believe > tha this will somewhat simplify the patch series by James Bottomley in > passing secrets to the crypto backends. > > Glenn A single question for patch 3/4, b

Re: [PATCH v3 3/4] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-11-14 Thread Patrick Steinhardt
On Tue, Oct 12, 2021 at 06:26:28PM -0500, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn > --- > grub-core/disk/cryptodisk.c | 26 +- > grub-core/disk/geli.c | 9 - > grub-core/disk/luks.c | 11 +-- > grub-core/disk/luks2.c | 6 +++

Re: [PATCH] Drop gnulib fix-base64.patch

2021-11-14 Thread Patrick Steinhardt
self, not a gnulib patch. > > Signed-off-by: Robbie Harwood I agree this looks a lot cleaner than patching in support for booleans. Thanks for the patch! Reviewed-by: Patrick Steinhardt Patrick > --- > bootstrap.conf| 3 ++- > config.h.in

Re: [PATCH 3/3] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-10-10 Thread Patrick Steinhardt
On Mon, Oct 04, 2021 at 11:51:33PM -0500, Glenn Washburn wrote: > On Mon, 4 Oct 2021 10:55:21 +0200 > Patrick Steinhardt wrote: > > > On Mon, Sep 13, 2021 at 09:05:15PM +, Glenn Washburn wrote: > > > On Sun, 12 Sep 2021 13:17:29 +0200 > > > Patrick Steinha

[PATCH v2] luks2: Fix decoding of digests and salts with escaped chars

2021-10-04 Thread Patrick Steinhardt
ed-by: Afdal Signed-off-by: Patrick Steinhardt --- Changes compared to v1: - `luks2_base64_decode` now takes `decoded` as `grub_uint8_t *` instead of as `char *` - Adapted the comment explaining why we only unescape forward slashes, based on Glenn's feedback. - F

Re: [PATCH v2 3/4] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-10-04 Thread Patrick Steinhardt
On Sun, Oct 03, 2021 at 06:57:45PM -0500, Glenn Washburn wrote: > On Sun, 3 Oct 2021 21:16:09 +0200 > Patrick Steinhardt wrote: > > > On Mon, Sep 27, 2021 at 06:14:02PM -0500, Glenn Washburn wrote: > > > Signed-off-by: Glenn Washburn > > > --- > &

Re: [PATCH 3/3] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-10-04 Thread Patrick Steinhardt
On Mon, Sep 13, 2021 at 09:05:15PM +, Glenn Washburn wrote: > On Sun, 12 Sep 2021 13:17:29 +0200 > Patrick Steinhardt wrote: > > > On Tue, Sep 07, 2021 at 02:34:30AM +, Glenn Washburn wrote: > > > On Mon, 30 Aug 2021 20:02:26 +0200 > > > Patrick Steinha

Re: [PATCH] luks2: Fix decoding of digests and salts with escaped chars

2021-10-03 Thread Patrick Steinhardt
On Tue, Sep 28, 2021 at 12:55:24PM -0500, Glenn Washburn wrote: > On Tue, 28 Sep 2021 17:13:10 +0200 > Daniel Kiper wrote: > > > CC-ing Glenn... > > Thanks, I missed this > > > On Wed, Aug 11, 2021 at 08:55:32PM +0200, Patrick Steinhardt wrote: > > > I

Re: [PATCH v2 4/4] cryptodisk: Remove unneeded found_uuid from cryptomount args

2021-10-03 Thread Patrick Steinhardt
On Mon, Sep 27, 2021 at 06:14:03PM -0500, Glenn Washburn wrote: > The member found_uuid was never used by the crypto-backends, but was used to > determine if a crypto-backend successfully mounted a cryptodisk with a given > uuid. This is not needed however, because grub_device_iterate will return 1

Re: [PATCH v2 3/4] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-10-03 Thread Patrick Steinhardt
On Mon, Sep 27, 2021 at 06:14:02PM -0500, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn > --- > grub-core/disk/cryptodisk.c | 26 +- > grub-core/disk/geli.c | 9 - > grub-core/disk/luks.c | 11 +-- > grub-core/disk/luks2.c | 6 +++

Re: [PATCH v2 2/4] cryptodisk: Refactor password input from crypto dev modules into cryptodisk

2021-10-03 Thread Patrick Steinhardt
On Mon, Sep 27, 2021 at 06:14:01PM -0500, Glenn Washburn wrote: > The crypto device modules should only be setting up the crypto devices and > not getting user input. This has the added benefit of simplifying the code > such that three essentially duplicate pieces of code are merged into one. > >

Re: [PATCH v2 1/4] cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules

2021-10-03 Thread Patrick Steinhardt
On Mon, Sep 27, 2021 at 06:14:00PM -0500, Glenn Washburn wrote: > As an example, passing a password as a cryptomount argument is implemented. > However, the backends are not implemented, so testing this will return a not > implemented error. > > Signed-off-by: Glenn Washburn > --- > grub-core/di

Re: [PATCH 3/3] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-09-12 Thread Patrick Steinhardt
On Tue, Sep 07, 2021 at 02:34:30AM +, Glenn Washburn wrote: > On Mon, 30 Aug 2021 20:02:26 +0200 > Patrick Steinhardt wrote: > > > On Thu, Aug 26, 2021 at 12:08:52AM -0500, Glenn Washburn wrote: > > > Signed-off-by: Glenn Washburn > > > --- > &

Re: [PATCH 1/3] cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules

2021-09-12 Thread Patrick Steinhardt
On Tue, Sep 07, 2021 at 04:43:18AM +, Glenn Washburn wrote: > On Mon, 30 Aug 2021 19:55:59 +0200 > Patrick Steinhardt wrote: > > On Thu, Aug 26, 2021 at 12:08:50AM -0500, Glenn Washburn wrote: [snip] > > > diff --git a/grub-core/disk/luks.c b/grub-core/disk/luks.c

Re: [PATCH v3 2/6] mm: Allow dynamically requesting additional memory regions

2021-09-12 Thread Patrick Steinhardt
On Fri, Sep 03, 2021 at 10:23:15PM +1000, Daniel Axtens wrote: > Daniel Kiper writes: > > > On Thu, Sep 02, 2021 at 12:48:24AM +1000, Daniel Axtens wrote: > >> Patrick Steinhardt writes: > >> > >> > Currently, all platforms will set up their heap on

Re: [PATCH v3 0/6] Runtime allocation of memory regions

2021-08-30 Thread Patrick Steinhardt
On Mon, Aug 30, 2021 at 07:49:07PM +0200, Daniel Kiper wrote: > On Fri, Aug 27, 2021 at 01:39:05PM +1000, Daniel Axtens wrote: > > Daniel Kiper writes: > > > > > Hey, > > > > > > Adding Daniel Axtens... > > > > > > On Sun, Aug 15, 2

Re: [PATCH 3/3] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-08-30 Thread Patrick Steinhardt
On Thu, Aug 26, 2021 at 12:08:52AM -0500, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn > --- > grub-core/disk/cryptodisk.c | 26 +- > include/grub/cryptodisk.h | 3 +++ > 2 files changed, 12 insertions(+), 17 deletions(-) > > diff --git a/grub-core/disk/crypto

Re: [PATCH 1/3] cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules

2021-08-30 Thread Patrick Steinhardt
On Thu, Aug 26, 2021 at 12:08:50AM -0500, Glenn Washburn wrote: > As an example, passing a password as a cryptomount argument is implemented. > However, the backends are not implemented, so testing this will return a not > implemented error. > > Signed-off-by: Glenn Washburn > --- > grub-core/di

Re: [PATCH 00/12] Grub-shell improvements

2021-08-30 Thread Patrick Steinhardt
On Mon, Aug 30, 2021 at 06:33:15PM +0200, Denis 'GNUtoo' Carikli wrote: > On Mon, 30 Aug 2021 17:23:44 +0200 > Daniel Kiper wrote: > > > CC-ing Denis and Patrick... > > > > On Thu, Aug 26, 2021 at 05:08:21PM -0500, Glenn Washburn wrote: > > > Hi Daniel, > > > > > > On Thu, 26 Aug 2021 20:00:32 +

[PATCH v3 6/6] efi: mm: Implement runtime addition of pages

2021-08-15 Thread Patrick Steinhardt
pages available in the current heap. Signed-off-by: Patrick Steinhardt --- grub-core/kern/efi/mm.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c index ced3ee5e7..f3d2e2b99 100644 --- a/grub-core/kern/efi/mm.c

[PATCH v3 5/6] efi: mm: Pass up errors from `add_memory_regions ()`

2021-08-15 Thread Patrick Steinhardt
)` in case `grub_efi_mm_add_regions ()` returns an error. Signed-off-by: Patrick Steinhardt --- grub-core/kern/efi/mm.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c index cfc6a67fc..ced3ee5e7 100644 --- a/grub-core/kern/efi/

[PATCH v3 2/6] mm: Allow dynamically requesting additional memory regions

2021-08-15 Thread Patrick Steinhardt
up by the platform's own memory management subsystem, asking it to add a memory area with at least `n` bytes. If this succeeds, we retry searching for a valid memory region, which should now succeed. Signed-off-by: Patrick Steinhardt --- grub-core/kern/mm.c | 10 ++ include/g

[PATCH v3 4/6] efi: mm: Extract function to add memory regions

2021-08-15 Thread Patrick Steinhardt
In preparation of support for runtime-allocating additional memory region, this patch extracts the function to retrieve the EFI memory map and add a subset of it to GRUB's own memory regions. Signed-off-by: Patrick Steinhardt --- grub-core/kern/efi/mm.c | 23 --- 1

[PATCH v3 3/6] efi: mm: Always request a fixed number of pages on init

2021-08-15 Thread Patrick Steinhardt
I platform. But because we'll need to split up initialization of the memory subsystem and the request of pages from the firmware, we'd have to duplicate quite some logic at first only to remove it afterwards again. This seems quite pointless, so we instead have patches slightly out of order

[PATCH v3 0/6] Runtime allocation of memory regions

2021-08-15 Thread Patrick Steinhardt
Patrick Steinhardt (6): mm: Drop unused unloading of modules on OOM mm: Allow dynamically requesting additional memory regions efi: mm: Always request a fixed number of pages on init efi: mm: Extract function to add memory regions efi: mm: Pass up errors from `add_memory_regions ()` efi: mm

[PATCH v3 1/6] mm: Drop unused unloading of modules on OOM

2021-08-15 Thread Patrick Steinhardt
ned-off-by: Patrick Steinhardt --- grub-core/kern/dl.c | 20 grub-core/kern/mm.c | 8 include/grub/dl.h | 1 - 3 files changed, 29 deletions(-) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 48f8a7907..a62dbeebb 100644 --- a/grub-core/kern/dl.c +++ b

Re: [PATCH v2 3/4] efi: mm: Pass up errors from `add_memory_regions ()`

2021-08-15 Thread Patrick Steinhardt
On Mon, Aug 09, 2021 at 06:10:01PM +0200, Daniel Kiper wrote: > On Sun, Aug 08, 2021 at 03:31:49PM +0200, Patrick Steinhardt wrote: > > The function `add_memory_regions ()` is currently only called on system > > initialization to allocate a fixed amount of pages. As such, it did

[PATCH] luks2: Fix decoding of digests and salts with escaped chars

2021-08-11 Thread Patrick Steinhardt
GRUB doesn't know to unescape such characters, decoding this string will rightfully fail. Fix the issue by stripping the escape character for forward slashes. There is no need to do so for any other escaped character given that valid Base64 does not contain anything else. Signed-off-by: Pa

Re: [PATCH 3/4] luks2: set up dummy sector size during scan

2021-08-08 Thread Patrick Steinhardt
On Fri, Aug 06, 2021 at 12:51:10PM +0800, Michael Chang via Grub-devel wrote: [snip] > diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c > index 90f82b2d3..c2bb2b6eb 100644 > --- a/grub-core/disk/cryptodisk.c > +++ b/grub-core/disk/cryptodisk.c > @@ -1040,6 +1040,7 @@ grub_cryp

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

2021-08-08 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 --- grub-core/disk/lu

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

2021-08-08 Thread Patrick Steinhardt
support for Argon2 to enable decryption of LUKS2 partitions using this key derival function. As the code for Argon2 has been added in a previous commit in this series, adding support is now trivial. Signed-off-by: Patrick Steinhardt --- Makefile.util.def | 6 +- grub-core

[PATCH v4 1/5] kern: dl: Allow modules under CC0 license

2021-08-08 Thread Patrick Steinhardt
n.html#CC0 Signed-off-by: Patrick Steinhardt --- grub-core/kern/dl.c | 3 ++- util/grub-module-verifierXX.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 48f8a7907..7d395096f 100644 --- a/grub-core/kern/dl.c +++ b

[PATCH v4 3/5] argon2: Import reference implementation of Argon2

2021-08-08 Thread Patrick Steinhardt
uired that have been documented in "grub-dev.texi". [1]: https://github.com/P-H-C/phc-winner-argon2 Signed-off-by: Patrick Steinhardt --- docs/grub-dev.texi| 64 +++ grub-core/Makefile.core.def | 8 + grub-core/lib/argon2/LICENSE

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

2021-08-08 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

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

2021-08-08 Thread Patrick Steinhardt
using `grub_memset ()` to wipe memory. - A bunch of smallish fixes left and right. I guess these are best to be seen via below range diff. Patrick [1]: Patrick Steinhardt (5): kern: dl: Allow modules under CC0 license types.h: Add UINT-related macros needed for Argon2 argon2: I

[PATCH v2 4/4] efi: mm: Implement runtime addition of pages

2021-08-08 Thread Patrick Steinhardt
pages available in the current heap. Signed-off-by: Patrick Steinhardt --- grub-core/kern/efi/mm.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c index 376af10af..bf7102f9c 100644 --- a/grub-core/kern/efi/mm.c +++ b

[PATCH v2 3/4] efi: mm: Pass up errors from `add_memory_regions ()`

2021-08-08 Thread Patrick Steinhardt
m the firmware at runtime, where it doesn't make sense anymore to fail hard. Refactor the function to return an error to prepare for this. Signed-off-by: Patrick Steinhardt --- grub-core/kern/efi/mm.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/grub

[PATCH v2 2/4] efi: mm: Extract function to add memory regions

2021-08-08 Thread Patrick Steinhardt
e tried to allocate a quarter of available system memory, bounded by a minimum/maximum value. As we're about to implement runtime allocation of memory, we now instead always request the minimum amount of bytes and let the memory allocator call out to our callback. Signed-off-by: Patrick Steinh

[PATCH v2 0/4] Runtime allocation of memory regions

2021-08-08 Thread Patrick Steinhardt
d, it requires us to allocate a consecutive 1GB chunk in which the resulting key will be computed. Patrick Patrick Steinhardt (4): mm: Allow dynamically requesting additional memory regions efi: mm: Extract function to add memory regions efi: mm: Pass up errors from `add_memory_regions ()` ef

[PATCH v2 1/4] mm: Allow dynamically requesting additional memory regions

2021-08-08 Thread Patrick Steinhardt
up by the platform's own memory management subsystem, asking it to add a memory area with at least `n` bytes. If this succeeds, we retry searching for a valid memory region, which should now succeed. Signed-off-by: Patrick Steinhardt --- grub-core/kern/mm.c | 11 ++- include/g

Re: [PATCH v3 2/4] ieee1275: claim more memory

2021-08-08 Thread Patrick Steinhardt
On Sat, Aug 07, 2021 at 06:11:09PM +0200, Patrick Steinhardt wrote: > On Wed, Aug 04, 2021 at 08:40:01AM -0400, Stefan Berger wrote: > > > > On 8/4/21 7:19 AM, Daniel Kiper wrote: > > > CC-ing Patrick. > > > > > > On Fri, Jul 30, 2021 at 11:45:38AM -0400

Re: [PATCH v3 2/4] ieee1275: claim more memory

2021-08-07 Thread Patrick Steinhardt
On Wed, Aug 04, 2021 at 08:40:01AM -0400, Stefan Berger wrote: > > On 8/4/21 7:19 AM, Daniel Kiper wrote: > > CC-ing Patrick. > > > > On Fri, Jul 30, 2021 at 11:45:38AM -0400, Stefan Berger wrote: > >> From: Daniel Axtens > >> > >> On powerpc-ieee1275, we are running out of memory trying to verif

Re: [PATCH v2 02/22] ieee1275: claim more memory

2021-07-15 Thread Patrick Steinhardt
On Thu, Jul 15, 2021 at 11:51:04PM +0200, Daniel Kiper wrote: > CC-in a few people who can be interested in this... > > On Wed, Jun 30, 2021 at 06:40:11PM +1000, Daniel Axtens wrote: > > On powerpc-ieee1275, we are running out of memory trying to verify > > anything. This is because: > > > > - we

Re: GRUB 2.06 is out - what next?

2021-06-08 Thread Patrick Steinhardt
Hi, On Tue, Jun 08, 2021 at 07:58:18PM +0200, Daniel Kiper wrote: > Hi all, > > As you may saw the GRUB 2.06 is out! This means, among others, code > unfreeze... :-) I am going to start reviewing all the patches which are > lingering in my mailbox since 2020 in July (yeah, this year if somebody >

Re: [PATCH 1/1] docs: luks2: Mention key derival function support

2021-02-03 Thread Patrick Steinhardt
On Wed, Feb 03, 2021 at 12:02:19PM +0100, Petr Vorel wrote: > To give users hint why Argon2 (the default in cryptsetup for LUKS2) > does not work. > > Signed-off-by: Petr Vorel Reviewed-by: Patrick Steinhardt > --- > Hi, > > it'd be nice to have it for Grub 2.

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

2021-01-19 Thread Patrick Steinhardt
On Tue, Jan 19, 2021 at 02:06:15PM +0100, Petr Vorel wrote: > Hi, > > > Please try to build only for the "efi-64" platform. (not "pc") > right, I'll test it, but we need to support also legacy bios. I wasn't aware it wouldn't build on the "pc" platform, but I never even tried in the first place.

Re: [PATCH] Make EFI minimum heap size configurable via --enable-efi-min-heap-mb

2021-01-05 Thread Patrick Steinhardt
On Tue, Jan 05, 2021 at 10:02:12AM +0100, Paul Menzel wrote: > Dear Hanson, > > > Am 04.01.21 um 20:34 schrieb Char, Hanson via Grub-devel: > > When booted in UEFI mode, Grub would fail to load a ramdisk of size larger > > than "(total_pages >> 2)" with > > > > "error: out of memory" > >

Re: [PATCH v8 00/18] Cryptodisk fixes for v2.06 redux

2020-12-12 Thread Patrick Steinhardt
On Sat, Dec 12, 2020 at 03:40:30PM +0100, Daniel Kiper wrote: > On Sat, Dec 12, 2020 at 09:20:24AM +0100, Patrick Steinhardt wrote: > > On Thu, Dec 10, 2020 at 05:20:59PM +0100, Daniel Kiper wrote: > > > On Tue, Dec 08, 2020 at 04:45:31PM -0600, Glenn Washburn wrote: > &g

Re: [PATCH v8 00/18] Cryptodisk fixes for v2.06 redux

2020-12-12 Thread Patrick Steinhardt
On Thu, Dec 10, 2020 at 05:20:59PM +0100, Daniel Kiper wrote: > On Tue, Dec 08, 2020 at 04:45:31PM -0600, Glenn Washburn wrote: > > This patch series, fixes issues with v7 series. Some of those patches had > > changes applied to the wrong patch. The added structure member was renamed > > again, thi

Re: [PATCH v8 18/18] luks2: Use grub_log2ull to calculate log_sector_size and improve readability

2020-12-12 Thread Patrick Steinhardt
On Tue, Dec 08, 2020 at 04:45:49PM -0600, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn > Reviewed-by: Daniel Kiper Reviewed-by: Patrick Steinhardt > --- > grub-core/disk/luks2.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/grub-cor

Re: [PATCH v8 17/18] misc: Add grub_log2ull macro for calculating log base 2 of 64-bit integers

2020-12-12 Thread Patrick Steinhardt
On Tue, Dec 08, 2020 at 04:45:48PM -0600, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn > Reviewed-by: Daniel Kiper Reviewed-by: Patrick Steinhardt > --- > include/grub/misc.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/grub/misc.h

Re: [PATCH v8 16/18] mips: Enable __clzdi2()

2020-12-12 Thread Patrick Steinhardt
d-by: Daniel Kiper Reviewed-by: Patrick Steinhardt > --- > grub-core/kern/compiler-rt.c | 2 +- > include/grub/compiler-rt.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c > index a464200c6..

  1   2   3   4   >