[PATCH v13 05/13] Add DSA and RSA SEXP tests

2025-05-24 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/Makefile.core.def | 16 grub-core/tests/dsa_sexp_test.c | 127

[PATCH v13 00/13] Upgrade to libgcrypt 1.11

2025-05-24 Thread Vladimir Serbinenko
Upgrade to libgcrypt 1.11 Changes from v12: * Import blake_vl_hash * Remove changes to b64dec and use a special header instead ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH v13 13/13] libgcrypt: Don't use 64-bit division on platforms where it's slow

2025-05-24 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/07_disable_64div.patch | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/07_disable_64div.patch diff --git a/grub-core/lib/libgcrypt-patches/07_disable_64div.patch b/grub

[PATCH v13 10/13] libgcrypt: Import blake family of hashes

2025-05-24 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/06_blake.patch | 80 +++ include/grub/crypto.h | 9 +++ util/import_gcry.py | 36 +++-- 3 files changed, 118 insertions(+), 7 deletions(-) create mode

[PATCH v13 03/13] b64dec: Add harness for compilation in GRUB environment

2025-05-24 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/gpgrt-int.h | 24 1 file changed, 24 insertions(+) create mode 100644 grub-core/lib/gpgrt-int.h diff --git a/grub-core/lib/gpgrt-int.h b/grub-core/lib/gpgrt-int.h new file mode 100644 index 0..45d63580b

[PATCH v13 09/13] gcry: Ignore sign-compare warnings

2025-05-24 Thread Vladimir Serbinenko
libgcrypt itself is compiled with -Wno-sign-compare. Do the same for consistency Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common| 2 +- grub-core/Makefile.core.def | 10 +- util/import_gcry.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v13 04/13] Adjust import script, definitions and API users for libgcrypt 1.11

2025-05-24 Thread Vladimir Serbinenko
This patches modifies the GRUB-libgcrypt API to match new libgcrypt 1.11 Signed-off-by: Vladimir Serbinenko --- autogen.sh| 5 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def | 20 +- grub-core

[PATCH v13 12/13] import_gcry: Fix pylint warnings

2025-05-24 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/import_gcry.py | 1276 +-- 1 file changed, 622 insertions(+), 654 deletions(-) diff --git a/util/import_gcry.py b/util/import_gcry.py index 9b0e8d936..086bde77c 100644 --- a/util/import_gcry.py +++ b/util

[PATCH v13 11/13] import_gcry: Make compatible with python 3.4

2025-05-24 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/import_gcry.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/import_gcry.py b/util/import_gcry.py index ca918c777..9b0e8d936 100644 --- a/util/import_gcry.py +++ b/util/import_gcry.py @@ -249,15 +249,15 @@ for

[PATCH v13 06/13] keccak: Disable acceleration with SSE asm

2025-05-24 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

[PATCH v13 07/13] libgcrypt: Fix coverity warnings

2025-05-24 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../libgcrypt-patches/03_mpiutil_alloc.patch | 20 ++ .../lib/libgcrypt-patches/03_sexp_free.patch | 37 +++ 2 files changed, 57 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch create mode

[PATCH v13 02/13] Import b64dec from gpg-error

2025-05-24 Thread Vladimir Serbinenko
Imported from libgpg-error 1.51 Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 279 + 1 file changed, 279 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c new file mode

[PATCH v2] ia64: Disable optimizations using floating-point arithmetics

2025-05-03 Thread Vladimir Serbinenko
Options -minline-int-divide-* enable performing int division using floating point unit. They don't work in ski emulator and possibly on some real hardware. We don't really need them, so just use normal division. Signed-off-by: Vladimir Serbinenko --- configure.ac| 4

[PATCH v2 2/9] compiler-rt: Add pei386_runtime_relocator stub

2025-05-03 Thread Vladimir Serbinenko
It's inserted by mingw and is meaningless in our environment Signed-off-by: Vladimir Serbinenko --- grub-core/kern/compiler-rt.c | 4 include/grub/compiler-rt.h | 1 + 2 files changed, 5 insertions(+) diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c

[PATCH v2 5/5] Use mcmodel=extreme on loongarch64

2025-05-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/Makefile.common b/conf/Makefile.common index 40b1609df..30bf1fa44 100644 --- a/conf/Makefile.common +++ b/conf/Makefile.common @@ -14,6 +14,9 @@ if !COND_emu

[PATCH v2 8/9] Discard .buildid and .reloc in cygwin script

2025-05-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- conf/i386-cygwin-img-ld.sc | 4 1 file changed, 4 insertions(+) diff --git a/conf/i386-cygwin-img-ld.sc b/conf/i386-cygwin-img-ld.sc index 578da91b0..aeba49f45 100644 --- a/conf/i386-cygwin-img-ld.sc +++ b/conf/i386-cygwin-img-ld.sc @@ -50,6 +50,10

[PATCH v2 7/9] mkrescue: Fix compilation under cygwin.

2025-05-03 Thread Vladimir Serbinenko
Cygwin is an interesting case where grub_util_fd_sync needs a handle but fileno returns an fd. Just use fsync directly in this case Signed-off-by: Vladimir Serbinenko --- util/grub-mkrescue.c | 4 1 file changed, 4 insertions(+) diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c

[PATCH v2 6/9] Strip extra sections generated on cygwin when creating binary images

2025-05-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- gentpl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentpl.py b/gentpl.py index d8c6965d8..f20797228 100644 --- a/gentpl.py +++ b/gentpl.py @@ -775,7 +775,7 @@ def image(defn, platform): if test x$(TARGET_APPLE_LINKER) = x1; then

[PATCH v2 9/9] render-label: Supports canonical paths not starting with /

2025-05-03 Thread Vladimir Serbinenko
On windows canonical path starts with drive letter Signed-off-by: Vladimir Serbinenko --- util/render-label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/render-label.c b/util/render-label.c index 432a5c3d2..e78175180 100644 --- a/util/render-label.c +++ b/util

[PATCH v2 1/9] Fix error when cross-compiling for windows from unix-like OS

2025-05-03 Thread Vladimir Serbinenko
In this case exeext doesn't match the expected value by autoconf and so tests fail as autoconf looks for compiled binaries under wrong name. Signed-off-by: Vladimir Serbinenko --- configure.ac | 12 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac

[PATCH v2 4/9] hostdisk: Fix cygwin compilation

2025-05-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/osdep/windows/hostdisk.c| 5 +++-- include/grub/osdep/hostfile_windows.h | 10 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c index aaa6e2f8e

[PATCH v2 5/9] Add cygwin path to unifont

2025-05-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e9c6ad8cc..8417ce009 100644 --- a/configure.ac +++ b/configure.ac @@ -1925,7 +1925,7 @@ AC_ARG_WITH([unifont], if test "x$with_unifont

[PATCH v2 0/9] Fix compilation and installation on cygwin and mingw

2025-05-03 Thread Vladimir Serbinenko
I recently borked my GRUB install, both main and fallback. I had no external media but could boot into windows via EFI menu. I discovered that our compilation and installation from windows is broken. Here is the series of patches to fix it ___ Grub-deve

[PATCH v2 3/9] pe2elf: Set correct flag for relocation sections

2025-05-03 Thread Vladimir Serbinenko
Without this flag GRUB ignores the relocation section leading to a crash Signed-off-by: Vladimir Serbinenko --- util/grub-pe2elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c index 11331294f..b686f0c82 100644 --- a/util/grub-pe2elf.c +++ b/util

[PATCH v2 1/5] Use ET_DYN instead of ET_REL modules

2025-05-03 Thread Vladimir Serbinenko
ut as a possibility but it simplifies the code, so it's useful independently of Rust Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 10 +- conf/i386-modules.sc | 35 +++ configure.ac

[PATCH v2 3/5] Use ET_DYN images and PHDRs for creating relocatable images

2025-05-03 Thread Vladimir Serbinenko
adjustments to the asm code to be compatible with -shared. Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common| 2 +- configure.ac| 6 +- grub-core/Makefile.core.def | 20 +- grub-core/kern/ia64/efi/startup.S | 7 +- grub-core/kern/mips

[PATCH v2 2/5] loongarch64: Use got-based retrieval instead of la.

2025-05-03 Thread Vladimir Serbinenko
Unlike la, this approach should work even above 4GiB mark. Signed-off-by: Vladimir Serbinenko --- grub-core/kern/loongarch64/efi/startup.S | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/grub-core/kern/loongarch64/efi/startup.S b/grub-core/kern

[PATCH v2 4/5] Force mcmodel=large on x64 and riscv64

2025-05-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fbeea0c70..e34e3cd59 100644 --- a/configure.ac +++ b/configure.ac @@ -1322,8 +1322,10 @@ if test "$target_cpu" = x86_

[PATCH v2 0/3] Use -shared compilation instead of -Wl,-r

2025-05-03 Thread Vladimir Serbinenko
-Wl,-r is a partial linking and this file is only intended as intermediate result for linker, not really intended for any other use. To make them usable we end up doing all the linker job twice over: in mkimage and in runtime. -shared on the other hand is meant to be loaded and relocated and hence

[PATCH] ntfs: Fix attribute validation check

2025-05-03 Thread Vladimir Serbinenko
Without this fix GRUB doesn't see most of the files on NTFS partition. Signed-off-by: Vladimir Serbinenko --- grub-core/fs/ntfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c index b3117bf92..393a763ee 100644 --- a/grub-co

[PATCH 3/3] pe2elf: Set correct flag for relocation sections

2025-05-01 Thread Vladimir Serbinenko
Without this flag GRUB ignores the relocation section leading to a crash Signed-off-by: Vladimir Serbinenko --- util/grub-pe2elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c index 11331294f..b686f0c82 100644 --- a/util/grub-pe2elf.c +++ b/util

[PATCH 0/3] Fix mingw compilation

2025-05-01 Thread Vladimir Serbinenko
This fixes mingw build of modules and kernel. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 2/3] compiler-rt: Add pei386_runtime_relocator stub

2025-05-01 Thread Vladimir Serbinenko
It's inserted by mingw and is meaningless in our environment Signed-off-by: Vladimir Serbinenko --- grub-core/kern/compiler-rt.c | 4 include/grub/compiler-rt.h | 1 + 2 files changed, 5 insertions(+) diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c

[PATCH] Command lspaging to show paging table

2025-04-18 Thread Vladimir Serbinenko
This command for x86_64 and arm64 shows current paging table on platforms in question. Signed-off-by: Vladimir Serbinenko --- grub-core/Makefile.core.def | 8 ++ grub-core/commands/arm64/lspaging.c | 138 +++ grub-core/commands/x86_64/lspaging.c | 115

[PATCH v12 07/13] libgcrypt: Fix coverity warnings

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../libgcrypt-patches/03_mpiutil_alloc.patch | 20 ++ .../lib/libgcrypt-patches/03_sexp_free.patch | 37 +++ 2 files changed, 57 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch create mode

[PATCH v12 04/13] Adjust import script, definitions and API users for libgcrypt 1.11

2025-04-15 Thread Vladimir Serbinenko
This patches modifies the GRUB-libgcrypt API to match new libgcrypt 1.11 Signed-off-by: Vladimir Serbinenko --- autogen.sh| 5 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def | 20 +- grub-core

[PATCH v12 08/13] Remove now unneeded gcrypt compilation flag

2025-04-15 Thread Vladimir Serbinenko
HAVE_STRTOUL is now defined in stdlib.h. Include it in g10lib.h rather than defining on command line Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 2 +- util/import_gcry.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/Makefile.common b/conf

[PATCH v12 10/13] libgcrypt: Import blake family of hashes

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/06_blake.patch | 80 +++ include/grub/crypto.h | 6 ++ util/import_gcry.py | 36 +++-- 3 files changed, 115 insertions(+), 7 deletions(-) create mode

[PATCH v12 09/13] gcry: Ignore sign-compare warnings

2025-04-15 Thread Vladimir Serbinenko
libgcrypt itself is compiled with -Wno-sign-compare. Do the same for consistency Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common| 2 +- grub-core/Makefile.core.def | 10 +- util/import_gcry.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v12 12/13] import_gcry: Fix pylint warnings

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/import_gcry.py | 1277 +-- 1 file changed, 623 insertions(+), 654 deletions(-) diff --git a/util/import_gcry.py b/util/import_gcry.py index 396ce0f68..cd54daca1 100644 --- a/util/import_gcry.py +++ b/util

[PATCH v12 05/13] Add DSA and RSA SEXP tests

2025-04-15 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/Makefile.core.def | 16 grub-core/tests/dsa_sexp_test.c | 127

[PATCH v12 06/13] keccak: Disable acceleration with SSE asm

2025-04-15 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

[PATCH v12 13/13] libgcrypt: Don't use 64-bit division on platforms where it's slow

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/07_disable_64div.patch | 15 +++ 1 file changed, 15 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/07_disable_64div.patch diff --git a/grub-core/lib/libgcrypt-patches/07_disable_64div.patch b/grub

[PATCH v12 03/13] b64dec: Adjust for compilation in GRUB environment

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c index 868d98568..8aafa9700 100644 --- a/grub-core/lib/b64dec.c +++ b/grub-core

[PATCH v12 02/13] Import b64dec from gpg-error

2025-04-15 Thread Vladimir Serbinenko
Imported from libgpg-error 1.51 Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 279 + 1 file changed, 279 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c new file mode

[PATCH v12 00/13] Upgrade libgcrypt to 1.11

2025-04-15 Thread Vladimir Serbinenko
Changes from v11: * Removed 64-bit division in mpi ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH v11 05/14] Add DSA and RSA SEXP tests

2025-04-15 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/Makefile.core.def | 16 grub-core/tests/dsa_sexp_test.c | 127

[PATCH v11 02/14] Import b64dec from gpg-error

2025-04-15 Thread Vladimir Serbinenko
Imported from libgpg-error 1.51 Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 279 + 1 file changed, 279 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c new file mode

[PATCH v11 13/14] import_gcry: Make compatible with python 3.4

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/import_gcry.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/import_gcry.py b/util/import_gcry.py index b6ddde9cd..396ce0f68 100644 --- a/util/import_gcry.py +++ b/util/import_gcry.py @@ -249,15 +249,15 @@ for

[PATCH v11 08/14] Remove now unneeded gcrypt compilation flag

2025-04-15 Thread Vladimir Serbinenko
HAVE_STRTOUL is now defined in stdlib.h. Include it in g10lib.h rather than defining on command line Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 2 +- util/import_gcry.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/Makefile.common b/conf

[PATCH v11 07/14] libgcrypt: Fix coverity warnings

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../libgcrypt-patches/03_mpiutil_alloc.patch | 20 ++ .../lib/libgcrypt-patches/03_sexp_free.patch | 37 +++ 2 files changed, 57 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch create mode

[PATCH v11 12/14] libgcrypt: Import blake family of hashes

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/06_blake.patch | 80 +++ include/grub/crypto.h | 6 ++ util/import_gcry.py | 36 +++-- 3 files changed, 115 insertions(+), 7 deletions(-) create mode

[PATCH v11 09/14] Implement __aeabi_uldivmod

2025-04-15 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 v11 11/14] gcry: Ignore sign-compare warnings

2025-04-15 Thread Vladimir Serbinenko
libgcrypt itself is compiled with -Wno-sign-compare. Do the same for consistency Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common| 2 +- grub-core/Makefile.core.def | 10 +- util/import_gcry.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v11 10/14] Enable (u)divdi3 and (u)moddi3 for mips

2025-04-15 Thread Vladimir Serbinenko
Some mips compilers insert 64-bit division into the code compiled from libgcrypt source and possibly others. Rather than fighting it, simply provide the functions in question. Signed-off-by: Vladimir Serbinenko --- gentpl.py| 2 +- grub-core/kern/compiler-rt.c | 6

[PATCH v11 04/14] Adjust import script, definitions and API users for libgcrypt 1.11

2025-04-15 Thread Vladimir Serbinenko
This patches modifies the GRUB-libgcrypt API to match new libgcrypt 1.11 Signed-off-by: Vladimir Serbinenko --- autogen.sh| 5 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def | 20 +- grub-core

[PATCH v11 06/14] keccak: Disable acceleration with SSE asm

2025-04-15 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

[PATCH v11 14/14] import_gcry: Fix pylint warnings

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/import_gcry.py | 1277 +-- 1 file changed, 623 insertions(+), 654 deletions(-) diff --git a/util/import_gcry.py b/util/import_gcry.py index 396ce0f68..cd54daca1 100644 --- a/util/import_gcry.py +++ b/util

[PATCH v11 03/14] b64dec: Adjust for compilation in GRUB environment

2025-04-15 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c index 868d98568..8aafa9700 100644 --- a/grub-core/lib/b64dec.c +++ b/grub-core

[PATCH v11 00/14] Upgrade libgcrypt to 1.11

2025-04-15 Thread Vladimir Serbinenko
Upgrade libgcrypt to 1.11. Changes from previous version: * Export signed in addition to unsigned division on mips ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH v11 14/14] import_gcry: Fix pylint warnings

2025-04-10 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/import_gcry.py | 1277 +-- 1 file changed, 623 insertions(+), 654 deletions(-) diff --git a/util/import_gcry.py b/util/import_gcry.py index 396ce0f68..cd54daca1 100644 --- a/util/import_gcry.py +++ b/util

[PATCH v11 08/14] Remove now unneeded gcrypt compilation flag

2025-04-10 Thread Vladimir Serbinenko
HAVE_STRTOUL is now defined in stdlib.h. Include it in g10lib.h rather than defining on command line Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 2 +- util/import_gcry.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/Makefile.common b/conf

[PATCH v11 05/14] Add DSA and RSA SEXP tests

2025-04-10 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/Makefile.core.def | 16 grub-core/tests/dsa_sexp_test.c | 127

[PATCH v11 03/14] b64dec: Adjust for compilation in GRUB environment

2025-04-10 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c index 868d98568..8aafa9700 100644 --- a/grub-core/lib/b64dec.c +++ b/grub-core

[PATCH v11 13/14] import_gcry: Make compatible with python 3.4

2025-04-10 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/import_gcry.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/import_gcry.py b/util/import_gcry.py index b6ddde9cd..396ce0f68 100644 --- a/util/import_gcry.py +++ b/util/import_gcry.py @@ -249,15 +249,15 @@ for

[PATCH v11 09/14] Implement __aeabi_uldivmod

2025-04-10 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 v11 04/14] Adjust import script, definitions and API users for libgcrypt 1.11

2025-04-10 Thread Vladimir Serbinenko
This patches modifies the GRUB-libgcrypt API to match new libgcrypt 1.11 Signed-off-by: Vladimir Serbinenko --- autogen.sh| 5 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def | 20 +- grub-core

[PATCH v11 07/14] libgcrypt: Fix coverity warnings

2025-04-10 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../libgcrypt-patches/03_mpiutil_alloc.patch | 20 ++ .../lib/libgcrypt-patches/03_sexp_free.patch | 37 +++ 2 files changed, 57 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch create mode

[PATCH v11 02/14] Import b64dec from gpg-error

2025-04-10 Thread Vladimir Serbinenko
Imported from libgpg-error 1.51 Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 279 + 1 file changed, 279 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c new file mode

[PATCH v11 06/14] keccak: Disable acceleration with SSE asm

2025-04-10 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

[PATCH v11 11/14] gcry: Ignore sign-compare warnings

2025-04-10 Thread Vladimir Serbinenko
libgcrypt itself is compiled with -Wno-sign-compare. Do the same for consistency Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common| 2 +- grub-core/Makefile.core.def | 10 +- util/import_gcry.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v11 00/14] Update libgcrypt to 1.11

2025-04-10 Thread Vladimir Serbinenko
Changes from v10: * Made compatible with python v3.4 * Fixed pylint warnings ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH v11 12/14] libgcrypt: Import blake family of hashes

2025-04-10 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/06_blake.patch | 80 +++ include/grub/crypto.h | 6 ++ util/import_gcry.py | 36 +++-- 3 files changed, 115 insertions(+), 7 deletions(-) create mode

[PATCH v11 10/14] Enable udivdi3 and umoddi3 for mips

2025-04-10 Thread Vladimir Serbinenko
Some mips 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/compiler-rt.c | 32 ++-- include/grub

[PATCH] ia64: Reset grub_errno on failure to allocate

2025-04-10 Thread Vladimir Serbinenko
The code goes on to allocate memory in another region on failure, hence it should discard the error. Signed-off-by: Vladimir Serbinenko --- grub-core/loader/ia64/efi/linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/loader/ia64/efi/linux.c b/grub-core/loader/ia64/efi

[PATCH] Disable gfxterm_menu and cmdline_cat tests

2025-04-10 Thread Vladimir Serbinenko
Those tests fail depending on the version of unifont. As we don't distribute our own unifont it fails for most users. Disable them so that they don't mask real failures. They can be reinstated once we solve unifont problem Signed-off-by: Vladimir Serbinenko --- grub-core/Makefil

[PATCH] ia64: Disable optimizations using floating-point arithmetics

2025-04-10 Thread Vladimir Serbinenko
They don't work in ski emulator and we don't really need them Signed-off-by: Vladimir Serbinenko --- configure.ac| 4 ++-- grub-core/Makefile.core.def | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 25f3ff932.

[PATCH 3/3] Use ET_DYN images and PHDRs for creating relocatable images

2025-04-08 Thread Vladimir Serbinenko
adjustments to the asm code to be compatible with -shared. Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common| 8 +- configure.ac| 7 +- grub-core/Makefile.core.def | 20 +- grub-core/kern/ia64/efi/startup.S | 7 +- grub-core/kern/mips

[PATCH v10 08/12] Remove now unneeded gcrypt compilation flag

2025-04-08 Thread Vladimir Serbinenko
HAVE_STRTOUL is now defined in stdlib.h. Include it in g10lib.h rather than defining on command line Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 2 +- util/import_gcry.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/Makefile.common b/conf

[PATCH v10 05/12] Add DSA and RSA SEXP tests

2025-04-08 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/Makefile.core.def | 16 grub-core/tests/dsa_sexp_test.c | 127

[PATCH v10 07/12] libgcrypt: Fix coverity warnings

2025-04-08 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../libgcrypt-patches/03_mpiutil_alloc.patch | 20 ++ .../lib/libgcrypt-patches/03_sexp_free.patch | 37 +++ 2 files changed, 57 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/03_mpiutil_alloc.patch create mode

[PATCH v10 06/12] keccak: Disable acceleration with SSE asm

2025-04-08 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

[PATCH v10 00/12] Upgrade libgcrypt to 1.11

2025-04-08 Thread Vladimir Serbinenko
Changes from v9: * Split accidentally squashed unrelated patches ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH v10 10/12] Enable udivdi3 and umoddi3 for mips

2025-04-08 Thread Vladimir Serbinenko
Some mips 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/compiler-rt.c | 32 ++-- include/grub

[PATCH v10 09/12] Implement __aeabi_uldivmod

2025-04-08 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 v10 04/12] Adjust import script, definitions and API users for libgcrypt 1.11

2025-04-08 Thread Vladimir Serbinenko
This patches modifies the GRUB-libgcrypt API to match new libgcrypt 1.11 Signed-off-by: Vladimir Serbinenko --- autogen.sh| 5 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def | 20 +- grub-core

[PATCH v10 11/12] gcry: Ignore sign-compare warnings

2025-04-08 Thread Vladimir Serbinenko
libgcrypt itself is compiled with -Wno-sign-compare. Do the same for consistency Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common| 2 +- grub-core/Makefile.core.def | 10 +- util/import_gcry.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff

[PATCH v10 12/12] libgcrypt: Import blake family of hashes

2025-04-08 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/06_blake.patch | 80 +++ include/grub/crypto.h | 6 ++ util/import_gcry.py | 36 +++-- 3 files changed, 115 insertions(+), 7 deletions(-) create mode

[PATCH v10 03/12] b64dec: Adjust for compilation in GRUB environment

2025-04-08 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c index 868d98568..8aafa9700 100644 --- a/grub-core/lib/b64dec.c +++ b/grub-core

[PATCH v10 02/12] Import b64dec from gpg-error

2025-04-08 Thread Vladimir Serbinenko
Imported from libgpg-error 1.51 Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 279 + 1 file changed, 279 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c new file mode

[PATCH 1/3] Use ET_DYN instead of ET_REL modules

2025-04-08 Thread Vladimir Serbinenko
ut as a possibility but it simplifies the code, so it's useful independently of Rust Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 10 +- conf/i386-modules.sc | 35 +++ configure.ac

[PATCH 2/3] loongarch64: Use la.pcrel instead of la.

2025-04-08 Thread Vladimir Serbinenko
la.pcrel unlike la should work even above 4GiB mark. Signed-off-by: Vladimir Serbinenko --- grub-core/kern/loongarch64/efi/startup.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/loongarch64/efi/startup.S b/grub-core/kern/loongarch64/efi/startup.S index

[PATCH 0/3] Use -shared compilation instead of -Wl,-r

2025-04-08 Thread Vladimir Serbinenko
-Wl,-r is a partial linking and this file is only intended as intermediate result for linker, not really intended for any other use. To make them usable we end up doing all the linker job twice over: in mkimage and in runtime. -shared on the other hand is meant to be loaded and relocated and hence

[PATCH 0/3] Use -shared compilation instead of -Wl,-r

2025-04-08 Thread Vladimir Serbinenko
-Wl,-r is a partial linking and this file is only intended as intermediate result for linker, not really intended for any other use. To make them usable we end up doing all the linker job twice over: in mkimage and in runtime. -shared on the other hand is meant to be loaded and relocated and hence

[PATCH v9 06/11] keccak: Disable acceleration with SSE asm

2025-04-08 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

[PATCH v9 09/11] Implement __aeabi_uldivmod

2025-04-08 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 v9 05/11] Add DSA and RSA SEXP tests

2025-04-08 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/Makefile.core.def | 16 grub-core/tests/dsa_sexp_test.c | 127

[PATCH v9 10/11] gcry: Ignore sign-compare warnings

2025-04-08 Thread Vladimir Serbinenko
libgcrypt itself is compiled with -Wno-sign-compare. Do the same for consistency Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 2 +- grub-core/Makefile.core.def | 10 +- grub-core/kern/compiler-rt.c | 32 ++-- include/grub/compiler

[PATCH v9 11/11] libgcrypt: Import blake family of hashes

2025-04-08 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/06_blake.patch | 80 +++ include/grub/crypto.h | 6 ++ util/import_gcry.py | 36 +++-- 3 files changed, 115 insertions(+), 7 deletions(-) create mode

[PATCH v9 08/11] Remove now unneeded gcrypt compilation flag

2025-04-08 Thread Vladimir Serbinenko
HAVE_STRTOUL is now defined in stdlib.h. Include it in g10lib.h rather than defining on command line Signed-off-by: Vladimir Serbinenko --- conf/Makefile.common | 2 +- util/import_gcry.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/Makefile.common b/conf

  1   2   3   >