[PATCH v6 2/6] Import b64dec from gpg-error

2024-09-11 Thread Vladimir Serbinenko
Base on libgpg-error 1.49 but with modifications to make it compile in GRUB environment Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 293 + 1 file changed, 293 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-c

[PATCH v6 3/6] Adjust import script, definitions and API users for libgcrypt 1.11

2024-09-11 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- autogen.sh| 5 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def | 36 ++- grub-core/commands/hashsum.c | 2 +- grub-core/commands/legacycfg.c

[PATCH v6 6/6] Implement __aeabi_uldivmod

2024-09-11 Thread Vladimir Serbinenko
Some arm compilers insert 64-bit division into the code compiled from libgcrypt source and possibly others. Rether than fighting it, simply provide the function in question. Signed-off-by: Vladimir Serbinenko --- grub-core/kern/arm/compiler-rt.S | 11 +++ include/grub/compiler-rt.h

[PATCH v6 4/6] Add DSA and RSA SEXP tests

2024-09-11 Thread Vladimir Serbinenko
This allows us to test purely the integration of the implementation of DSA and RSA from libgcrypt without concerning with additional code. Signed-off-by: Vladimir Serbinenko --- grub-core/tests/dsa_sexp_test.c | 125 grub-core/tests/rsa_sexp_test.c | 99

[PATCH v6 5/6] keccak: Disable acceleration with SSE asm

2024-09-11 Thread Vladimir Serbinenko
Libgcrypt code assumes that on x64 all SSE registers are fair game. While it's true that CPUs in question support it, we disable it in our compilation options. Disable the offending optimization. Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/02_keccak_sse.patch | 23 ++

[PATCH 6/9] cmd_set_date: Ignore garbage line at shutdown

2024-09-11 Thread Vladimir Serbinenko
Fedora arm-efi and riscv64-efi are verbose and add a garbage line when shutting down. Ignore it Signed-off-by: Vladimir Serbinenko --- tests/grub_cmd_set_date.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/grub_cmd_set_date.in b/tests/grub_cmd_set_date.in index

[PATCH 7/9] partmap_test: Accept hd1 on arm-efi

2024-09-11 Thread Vladimir Serbinenko
Whether it's hd1 or hd2 depends on firmware. Just accept both variants. Signed-off-by: Vladimir Serbinenko --- tests/partmap_test.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/partmap_test.in b/tests/partmap_test.in index 4138e88fe..d67ad100f 100644 --- a/tests/par

[PATCH 1/9] grub-shell: Support riscv64-efi

2024-09-11 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/util/grub-shell.in | 43 +++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index ae5f711fe..04405a789 100644 --- a/tests/util/grub-shell.in +++ b/t

[PATCH 9/9] grub-shell: Explicitly specify firmware for i386-ieee1275

2024-09-11 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/util/grub-shell.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index 4b0900a32..de1eba83e 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -165,6 +165,12 @@ case "

[PATCH 3/9] grub-shell: Update qemu name of the machine

2024-09-11 Thread Vladimir Serbinenko
--- tests/util/grub-shell.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index e79296ccd..84fb6682f 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -144,7 +144,7 @@ case "${grub_modinfo_target_cpu}-

[PATCH 4/9] grub-shell: Temporarily use reboot on fuloong2e

2024-09-11 Thread Vladimir Serbinenko
Until we figure out why normal shutdown doesn't work, use reboot instead Signed-off-by: Vladimir Serbinenko --- tests/util/grub-shell.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index 84fb6682f..35ecc28dc 100644 ---

[PATCH 5/9] grub-shell: Support Fedora arm-efi

2024-09-11 Thread Vladimir Serbinenko
This needs 2 adjustments: * No separate vars file * Shutdown command is too chatty so we need to trim it. Signed-off-by: Vladimir Serbinenko --- tests/util/grub-shell.in | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.

[PATCH 8/9] grub-shell: Ignore trailing garbage on loongarch64-efi

2024-09-11 Thread Vladimir Serbinenko
--- tests/util/grub-shell.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index b7a7dff01..4b0900a32 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -544,7 +544,7 @@ source "\$prefix/testcase.cfg" #

[PATCH 2/9] grub-shell: Support Fedora path for ovmf32

2024-09-11 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/util/grub-shell.in | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index 04405a789..e79296ccd 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -192,6 +

[PATCH 8/8] configure: Try -msoft-float -mfloat-abi=soft on arm

2024-09-11 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- configure.ac | 5 + 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index d4a14bf93..2bca8814b 100644 --- a/configure.ac +++ b/configure.ac @@ -941,6 +941,11 @@ if test x"$platform" != xemu ; then AC_COMPILE_IFELSE([AC_L

[PATCH 1/8] riscv64: Support riscv_align relocations

2024-09-11 Thread Vladimir Serbinenko
They are purely for optimization, so no need to do anything. Signed-off-by: Vladimir Serbinenko --- grub-core/kern/riscv/dl.c | 1 + util/grub-mkimagexx.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/grub-core/kern/riscv/dl.c b/grub-core/kern/riscv/dl.c index 896653bb4..c47db6959 1

[PATCH 3/8] Support clang integrated-as sparc64

2024-09-11 Thread Vladimir Serbinenko
--- asm-tests/sparc64.S| 2 +- grub-core/boot/sparc64/ieee1275/boot.S | 3 +++ grub-core/boot/sparc64/ieee1275/diskboot.S | 3 +++ grub-core/kern/sparc64/ieee1275/crt0.S | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/asm-tests/sparc64.S b/asm

[PATCH 4/8] powerpc-ieee1275: Fix warnings and alignment

2024-09-11 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/kern/ieee1275/init.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index dfbd0b899..e3abd51a8 100644 --- a/grub-core/kern/ieee1275/init.c +++

[PATCH 2/8] compiler-rt: Add __multi3

2024-09-11 Thread Vladimir Serbinenko
It's necessary for clang sparc64 support --- grub-core/kern/compiler-rt.c | 58 include/grub/compiler-rt.h | 7 + 2 files changed, 65 insertions(+) diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c index eda689a0c..2902ed03d 10064

[PATCH 6/8] btrfs: Add an explicit GRUB_PACKED

2024-09-11 Thread Vladimir Serbinenko
Otherwise clang on arm complains --- grub-core/fs/btrfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index ba0c58352..0b06bc824 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c @@ -222,7 +222,7 @@ struct grub_btrfs_ex

[PATCH 5/8] efi/linux: Silence warning

2024-09-11 Thread Vladimir Serbinenko
--- grub-core/loader/efi/linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index bfbd95aee..bcb39c40a 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c @@ -55,6 +55,7 @@ static bool initrd_use_loadfile

[PATCH 7/8] Enable __clzsi2/__clzdi2 on arm

2024-09-11 Thread Vladimir Serbinenko
It's emitted by clang --- grub-core/kern/compiler-rt.c | 4 +--- include/grub/compiler-rt.h | 5 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c index 2902ed03d..17ae435c1 100644 --- a/grub-core/kern/compiler-rt.c +

Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot

2024-09-11 Thread adrian15sgd
El 6/9/24 a las 15:15, Askar Safin escribió: Hi. I propose changing "efi" to "EFI" in grub-mkrescue, because this is needed for secure boot. Please, apply patch below. Here is why. (...) I send this letter to grub-devel. Also I CC Pete Batard, because it seems my work is somehow related to

Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot

2024-09-11 Thread adrian15sgd
El 6/9/24 a las 15:15, Askar Safin escribió: Hi. I propose changing "efi" to "EFI" in grub-mkrescue, because this is needed for secure boot. Please, apply patch below. Here is why. (...) I CC Adrian, because I think the problem I talk about is the problem, which prevented supergrubdisk from

Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot

2024-09-11 Thread Tobias Powalowski via Grub-devel
Back in the day I added that commit on the supergrub history because I wasn't proud enough of the SecureBoot implementation or I messed up in which branch I was pushing those changes. Right now the SecureBoot build is turned on on the main supergrub codebase. It is based on the Debian binari

Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot

2024-09-11 Thread adrian15sgd
El 11/9/24 a las 12:38, Tobias Powalowski via Grub-devel escribió: Back in the day I added that commit on the supergrub history because I wasn't proud enough of the SecureBoot implementation or I messed up in which branch I was pushing those changes. Right now the SecureBoot build is turned on

Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot

2024-09-11 Thread Tobias Powalowski via Grub-devel
This is what it usually happens in a Secure Boot scenario: - UEFI Firmware loads up /BOOT/BOOTX64.EFI - BOOTX64.EFI (shim) is loaded. (Signed by Microsoft) - GRUBX64.EFI (Grub) is loaded. (Signed by Debian) - Kernel is loaded. (Signed by Debian) ... if any of the previous signatures are not va

Re: [PATCH 00/24] i386: Intel TXT and AMD SKINIT secure launcher

2024-09-11 Thread Sergii Dmytruk
Ping. Tip of the day: patches 01-07 and 18 are no-brainers. Initial submission with all the patches can be seen in the archive at https://lists.gnu.org/archive/html/grub-devel/2024-08/msg00088.html On Mon, Aug 26, 2024 at 03:44:10PM +0300, Sergii Dmytruk wrote: > Hello, > > [Resending cover