Re: [PATCH v2 4/5] cryptodisk: Use enum constants as indexes into cryptomount option array

2022-05-20 Thread Daniel Kiper
On Thu, May 19, 2022 at 03:31:48PM -0500, Glenn Washburn wrote: > On Thu, 19 May 2022 20:24:11 +0200 > Daniel Kiper wrote: > > > On Fri, May 13, 2022 at 12:00:50PM -0500, Glenn Washburn wrote: > > > Signed-off-by: Glenn Washburn > > > --- > > > grub-core/disk/cryptodisk.c | 53 ++

Re: [PATCH v3] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Daniel Kiper
On Thu, May 19, 2022 at 04:52:54PM -0400, Mathieu Desnoyers wrote: > - On May 19, 2022, at 2:36 PM, Daniel Kiper dki...@net-space.pl wrote: > [...] > > > > Could you do the same in util/grub.d/20_linux_xen.in? Both should be > > kept in sync. And you are not first one who updates 10_linux.in on

[PATCH V3] Enable TDX measurement to RTMR register

2022-05-20 Thread Lu Ken
Intel Trust Domain Extensions(Intel TDX) refers to an Intel technology that extends Virtual Machine Extensions(VMX) and Multi-Key Total Memory Encryption(MK-TME) with a new kind of virtual machine guest called a Trust Domain(TD)[1]. A TD runs in a CPU mode that protects the confidentiality of its m

Re: [PATCH v3] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Mathieu Desnoyers
- On May 20, 2022, at 7:01 AM, Daniel Kiper dki...@net-space.pl wrote: > On Thu, May 19, 2022 at 04:52:54PM -0400, Mathieu Desnoyers wrote: >> - On May 19, 2022, at 2:36 PM, Daniel Kiper dki...@net-space.pl wrote: >> [...] >> > >> > Could you do the same in util/grub.d/20_linux_xen.in? Bot

[RFC PATCH v3 3/5] grub-mkconfig hurd: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Mathieu Desnoyers
The current implementation of the 10_hurd script implements its menu items sorting in bash with a quadratic algorithm, calling "sed", "sort", "head", and "grep" to compare versions between individual lines, which is annoyingly slow for kernel developers who can easily end up with 50-100 kernels in

[RFC PATCH v3 1/5] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Mathieu Desnoyers
The current implementation of the 10_linux script implements its menu items sorting in bash with a quadratic algorithm, calling "sed", "sort", "head", and "grep" to compare versions between individual lines, which is annoyingly slow for kernel developers who can easily end up with 50-100 kernels in

[RFC PATCH v3 0/5] grub-mkconfig: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Mathieu Desnoyers
This series of patches fixes a O(n^2) algorithm in the menu items generation scripts. Testing is still needed on linux_xen, hurd, and kfreebsd. Mathieu Mathieu Desnoyers (5): grub-mkconfig linux: Fix quadratic algorithm for sorting menu items grub-mkconfig linux_xen: Fix quadratic algorithm

[RFC PATCH v3 4/5] grub-mkconfig kfreebsd: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Mathieu Desnoyers
The current implementation of the 10_kfreebsd script implements its menu items sorting in bash with a quadratic algorithm, calling "sed", "sort", "head", and "grep" to compare versions between individual lines, which is annoyingly slow for kernel developers who can easily end up with 50-100 kernels

[RFC PATCH v3 5/5] Cleanup: grub-mkconfig_lib: remove unused version comparison functions

2022-05-20 Thread Mathieu Desnoyers
There are no users left of version_find_latest(), version_test_gt(), and version_test_numeric(). Remove those unused helper functions. Using those helper functions is what caused the quadratic sorting performance issues in the first place, so removing them is a net win. Signed-off-by: Mathieu Desn

[RFC PATCH v3 2/5] grub-mkconfig linux_xen: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Mathieu Desnoyers
The current implementation of the 20_linux_xen script implements its menu items sorting in bash with a quadratic algorithm, calling "sed", "sort", "head", and "grep" to compare versions between individual lines, which is annoyingly slow for kernel developers who can easily end up with 50-100 kernel

Re: [RFC PATCH v3 0/5] grub-mkconfig: Fix quadratic algorithm for sorting menu items

2022-05-20 Thread Mathieu Desnoyers
Sorry, the subject prefix for this patch series should have been [RFC PATCH v4 n/5]. - On May 20, 2022, at 10:37 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > This series of patches fixes a O(n^2) algorithm in the menu items > generation scripts. > > Testing is still needed

[PATCH v3 1/2] devmapper/getroot: Have devmapper recognize LUKS2

2022-05-20 Thread Josselin Poiret via Grub-devel
Changes UUID comparisons so that LUKS1 and LUKS2 are both recognized as being LUKS cryptodisks. --- grub-core/osdep/devmapper/getroot.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grub-core/osdep/devmapper/getroot.c b/grub-core/osdep/devmapper/getroot.c index 9ba5c

[PATCH v3 0/2] Have LUKS2 cryptomounts be useable with grub-probe

2022-05-20 Thread Josselin Poiret via Grub-devel
Hello Glenn, Thanks for your review! I've adressed all of your comments with these revised patches (only the second one has changed), with the caveats below: Glenn Washburn writes: > >> +grub_util_error (_("can't set dm task name to `%s'"), name); >> + if (!dm_task_

[PATCH v3 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters

2022-05-20 Thread Josselin Poiret via Grub-devel
This lets a LUKS2 cryptodisk have all the cipher, hash, and sizes filled out, otherwise they wouldn't be initialized if cheat mounted. --- grub-core/osdep/devmapper/getroot.c | 130 +++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/grub-core/osdep/devmappe

[PATCH v3 0/5] Cryptomount keyfile support

2022-05-20 Thread Glenn Washburn
Uupdates from v2: * Use one error message for all string to interger conversion errors, suggested by Daniel * Move placement of keyfile_size == 0 check Updates from v1: * Make some changes suggested by Daniel * Improve error message for grub_strtoull() failures * Add patch to use enum cons

[PATCH v3 3/5] cryptodisk: Add options to cryptomount to support keyfiles

2022-05-20 Thread Glenn Washburn
From: John Lane Add the options --key-file, --keyfile-offset, and --keyfile-size to cryptomount and code to put read the requested key file data and pass via the cargs struct. Note, key file data is for all intents and purposes equivalent to a password given to cryptomount. So there is no need to

[PATCH v3 5/5] docs: Add documentation on keyfile option to cryptomount

2022-05-20 Thread Glenn Washburn
Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper --- docs/grub.texi | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/grub.texi b/docs/grub.texi index 50ef28edd..0a8057482 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -4490,11 +4490,15 @@ Alias

[PATCH v3 1/5] cryptodisk: luks: Unify grub_cryptodisk_dev function names

2022-05-20 Thread Glenn Washburn
From: Denis 'GNUtoo' Carikli Signed-off-by: Denis 'GNUtoo' Carikli Reviewed-by: Patrick Steinhardt Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper --- grub-core/disk/luks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/disk/luks.c b/grub-core/disk/

[PATCH v3 2/5] cryptodisk: geli: Unify grub_cryptodisk_dev function names

2022-05-20 Thread Glenn Washburn
From: Denis 'GNUtoo' Carikli Signed-off-by: Denis 'GNUtoo' Carikli Reviewed-by: Patrick Steinhardt Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper --- grub-core/disk/geli.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grub-core/disk/geli.c b/grub-core/d

[PATCH v3 4/5] cryptodisk: Use enum constants as indexes into cryptomount option array

2022-05-20 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- grub-core/disk/cryptodisk.c | 49 +++-- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c index 1198cb0e6..e2b8636e4 100644 --- a/grub-core/disk/cryptodisk.c +

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

2022-05-20 Thread Glenn Washburn
On Mon, 07 Feb 2022 14:15:07 +0100 Josselin Poiret via Grub-devel wrote: > Hi Fabian, > > Fabian Vogt writes: > > > Did you have a look at my approach? That effectively does the same, but > > using a > > single ioctl instead of anything complex with DM directly. I skipped this thread because

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

2022-05-20 Thread Glenn Washburn
Thanks for making these updates. On Fri, 20 May 2022 20:20:39 +0200 Josselin Poiret wrote: > This lets a LUKS2 cryptodisk have all the cipher, hash, and sizes > filled out, otherwise they wouldn't be initialized if cheat mounted. > --- > grub-core/osdep/devmapper/getroot.c | 130 +++