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

2022-06-13 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

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

2022-06-13 Thread Mathieu Desnoyers
This series of patches fixes a O(n^2) algorithm in the menu items generation scripts. Since v5, add Tested-by tags, and update patch 1 to apply bash best practices. Testing is still needed on kfreebsd. Mathieu Mathieu Desnoyers (5): grub-mkconfig linux: Fix quadratic algorithm for sorting men

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

2022-06-13 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

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

2022-06-13 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

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

2022-06-13 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

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

2022-06-13 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

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

2022-06-13 Thread Mathieu Desnoyers
- On Jun 10, 2022, at 4:00 PM, Jason Andryuk jandr...@gmail.com wrote: > On Thu, Jun 9, 2022 at 2:50 PM Mathieu Desnoyers > wrote: >> >> The current implementation of the 20_linux_xen script implements its >> menu items sorting in bash with a quadratic algorithm, calling "sed", >> "sort", "he

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

2022-06-13 Thread Mathieu Desnoyers
- On Jun 11, 2022, at 7:55 PM, samuel thibault samuel.thiba...@ens-lyon.org wrote: > Hello, > > Mathieu Desnoyers, le jeu. 09 juin 2022 14:50:22 -0400, a ecrit: >> The current implementation of the 10_hurd script implements its menu >> items sorting in bash with a quadratic algorithm, callin

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

2022-06-13 Thread Fabian Vogt
When using grub-probe with cryptodisk, the mapped block device from the host is used directly instead of decrypting the source device in GRUB code. In that case, the sector size and count of the host device needs to be used. This is especially important when using luks2, which does not assign total

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

2022-06-13 Thread Glenn Washburn
On Mon, 13 Jun 2022 16:29:48 +0200 Fabian Vogt wrote: > When using grub-probe with cryptodisk, the mapped block device from the host > is used directly instead of decrypting the source device in GRUB code. > In that case, the sector size and count of the host device needs to be used. > This is es