[PATCH 2/2] zfs: Add test for zfs zstd

2024-06-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/util/grub-fs-tester.in | 2 +- tests/zfs_test.in| 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in index df5dc7542..5690665d0 100644 --- a/tests/util/grub-fs-test

[PATCH 1/2] zfs: Support zstd compression

2024-06-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/Makefile.core.def | 1 + grub-core/fs/zfs/zfs.c | 35 +++ include/grub/zfs/zio.h | 1 + 3 files changed, 37 insertions(+) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 7fa9

[PATCH] Add --noefistub option for linux

2024-06-17 Thread Vladimir Serbinenko
In some cases like loading kernel from native disk (e.g. nvme) not supported by EFI in question efi stub is not an option. Allow user to disable efi stub and fallback to older protocol Signed-off-by: Vladimir Serbinenko --- grub-core/loader/efi/linux.c | 10 +- 1 file changed, 9 insertio

[PATCH v3] Add --noefistub option for linux

2024-06-17 Thread Vladimir Serbinenko
In some cases like loading kernel from native disk (e.g. nvme) not supported by EFI in question efi stub is not an option. Allow user to disable efi stub and fallback to older protocol Signed-off-by: Vladimir Serbinenko --- grub-core/loader/efi/linux.c | 10 +- 1 file changed, 9 insertio

[PATCH 2/2] emu/linux: Fix determination of program name

2024-06-17 Thread Vladimir Serbinenko
Current code works only if package matches binary name transformation rules. It's often true but is no waz guaranteed Fixes bug #64410 Signed-off-by: Vladimir Serbinenko --- grub-core/loader/emu/linux.c | 3 ++- include/grub/emu/misc.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(

[PATCH 1/2] cryptodisk: Fix translatable message

2024-06-17 Thread Vladimir Serbinenko
Fixes bug #64408. Signed-off-by: Vladimir Serbinenko --- grub-core/disk/cryptodisk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c index f98acade6..5e1eb2743 100644 --- a/grub-core/disk/cryptodisk.c +++ b/grub-c

[PATCH] getroot: Unmark 2 strings for translation

2024-06-17 Thread Vladimir Serbinenko
First they're use macros so they can't be translated as-is. Second there is no point in translating them as they're too technical. Signed-off-by: Vladimir Serbinenko --- grub-core/osdep/devmapper/getroot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/osdep/de

[PATCH v2] loader/efi/fdt: Add fdtdump command to access device tree

2024-06-17 Thread Tobias Heider
The fdtdump command allows dumping arbitrary device tree properties and saving them to a variable similar to the smbios command. This is useful in scripts where further actions such as selecting a kernel or loading another device tree depend on the compatible or model values of the device tree pro

Re: [PATCH v2] loader/efi/fdt: Add fdtdump command to access device tree

2024-06-17 Thread Vladimir 'phcoder' Serbinenko
Saving FDT subtly changes the behaviour. Image some command or even an external program modifying FDT and freeing old copy. Maybe we should call grub_efi_get_firmware_fdt every time we need fdt. On Mon, Jun 17, 2024 at 4:08 PM Tobias Heider wrote: > > The fdtdump command allows dumping arbitrary

Re: [PATCH v2] loader/efi/fdt: Add fdtdump command to access device tree

2024-06-17 Thread Tobias Heider
Right, this already came up in response to v1. I think grub is currently safe but after some further digging we might want to add support for the DT_FIXUP protocol or similar at some point and this makes things more complicated than necessary. I'll send another update. On Mon, Jun 17, 2024 at 3:4

Re: [PATCH v17 02/20] libtasn1: import libtasn1-4.19.0

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:35PM +0800, Gary Lin wrote: > From: Daniel Axtens > > Import a very trimmed-down set of libtasn1 files: > > curl -L -O https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.19.0.tar.gz > tar xf libtasn1-4.19.0.tar.gz > rm -rf grub-core/lib/libtasn1/ > mkdir -p grub-core/lib/lib

Re: [PATCH v17 03/20] libtasn1: disable code not needed in grub

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:36PM +0800, Gary Lin wrote: > Based on the patch from "Daniel Axtens " > > We don't expect to be able to write ASN.1, only read it, > so we can disable some code. > > Do that with #if 0/#endif, rather than deletion. This means > that the difference between upstream and

[PATCH v3] loader/efi/fdt: Add fdtdump command to access device tree

2024-06-17 Thread Tobias Heider
The fdtdump command allows dumping arbitrary device tree properties and saving them to a variable similar to the smbios command. This is useful in scripts where further actions such as selecting a kernel or loading another device tree depend on the compatible or model values of the device tree pro

Re: [PATCH v17 04/20] libtasn1: changes for grub compatibility

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:37PM +0800, Gary Lin wrote: > Based on the patch from "Daniel Axtens " > > Do a few things to make libtasn1 compile as part of grub: > > - remove _asn1_strcat and replace strcat with the bound-checked >_asn1_str_cat except the one inside _asn1_str_cat. That strcat

Re: [PATCH v17 05/20] libtasn1: fix the potential buffer overrun

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:38PM +0800, Gary Lin wrote: > In _asn1_tag_der(), the first while loop for the long form may end up > with a 'k' value with 'ASN1_MAX_TAG_SIZE' and cause the buffer overrun > in the second while loop. This commit tweaks the conditional check to > avoid producing a too

Re: [PATCH v17 06/20] libtasn1: compile into asn1 module

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:39PM +0800, Gary Lin wrote: > From: Daniel Axtens > > Create a wrapper file that specifies the module license. > Set up the makefile so it is built. > > Signed-off-by: Daniel Axtens > Signed-off-by: Gary Lin > Reviewed-by: Vladimir Serbinenko Due to amount of chan

Re: [PATCH v17 07/20] asn1_test: test module for libtasn1

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:40PM +0800, Gary Lin wrote: > From: Daniel Axtens > > Import tests from libtasn1 that don't use functionality we don't > import. This test module is integrated into functional_test so that the > user can run the test in grub shell. > > This doesn't test the full decod

Re: [PATCH v17 08/20] libtasn1: Add the documentation

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:41PM +0800, Gary Lin wrote: > Document libtasn1 in docs/grub-dev.texi and add the upgrade steps. > Also add the patches to make libtasn1 compatible with grub code. > > Signed-off-by: Gary Lin > Reviewed-by: Vladimir Serbinenko > --- > docs/grub-dev.texi | 33 +++

Re: [PATCH v17 09/20] key_protector: Add key protectors framework

2024-06-17 Thread Daniel Kiper via Grub-devel
On Fri, Jun 14, 2024 at 02:45:42PM +0800, Gary Lin wrote: > From: Hernan Gatta > > A key protector encapsulates functionality to retrieve an unlocking key > for a fully-encrypted disk from a specific source. A key protector > module registers itself with the key protectors framework when it is > l

[PATCH 1/1] util/grub-mkrescue: Check existence of option arguments

2024-06-17 Thread Thomas Schmitt via Grub-devel
As reported by Victoriia Egorova in bug 65880, grub-mkrescue does not verify that the expected argument of an option like -d or -k does really exist in argv. So check the loop counter before incrementing it inside the loop which copies argv to argp_argv. Issue an error message similar to what older

[PATCH v1 1/3] dirty 2d

2024-06-17 Thread kbader94
Modify the dirty function so it tracks and updates 2d regions. The current dirty() implementation only tracks the y coordinate changes, and then updates all the pixels in between the changed(dirty) y coordinates, such that the entire screen's width is updated even if just a single 16x16 pixel ch

[PATCH v1 3/3] fb rotation - Add config option to grub-mkconfig to enable setting GRUB_FB_ROTATION in grub's config file. Setting GRUB_FB_ROTATION to 90, 180, 270, 'left', 'right', or 'inverted' will

2024-06-17 Thread kbader94
Changes to be committed: modified: util/grub-mkconfig.in modified: util/grub.d/00_header.in modified: util/grub.d/10_linux.in Signed-off-by: kbader94 --- util/grub-mkconfig.in| 1 + util/grub.d/00_header.in | 16 util/grub.d/10_linux.in | 32 +

[PATCH v1 0/3] framebuffer rotation

2024-06-17 Thread kbader94
This patch series implements a framebuffer rotation configuration option which allows the user to specify a rotation translation to be applied to the video output from grub, such that user can programatically rotate the display. This enables grub to be used in nonstandard display mounting scheme

[PATCH v1 2/3] framebuffer rotation

2024-06-17 Thread kbader94
Add optional framebuffer rotation, which allows the user to specify the display output rotation MODIFIED: fbutil.h include/grub - Add function declarations. see below. video.h include/grub struct grub_video_mode_info - Add int original_width, int original_height, enum grub_video_ro

Re: [PATCH v17 04/20] libtasn1: changes for grub compatibility

2024-06-17 Thread Gary Lin via Grub-devel
On Mon, Jun 17, 2024 at 05:12:12PM +0200, Daniel Kiper wrote: > On Fri, Jun 14, 2024 at 02:45:37PM +0800, Gary Lin wrote: > > Based on the patch from "Daniel Axtens " > > > > Do a few things to make libtasn1 compile as part of grub: > > > > - remove _asn1_strcat and replace strcat with the bound-c