Re: [REGRESSION] Re: [PATCH v4 5/5] efi: Use generic EFI loader for x86_64 and i386

2024-06-27 Thread Mate Kukri
This is likely an issue stemming from a bad interaction between the firmware's PE loader and the kernel's efi stub. The reason peimage can appear to fix this as it bypasses the firmware's PE loader for secure boot reasons. Hiding bugs in said PE loader is a coincidental side benefit and not an

[PATCH v4 10/10] efi: Disallow fallback to legacy Linux loader when shim says NX is required.

2024-06-12 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/kern/efi/sb.c | 28 grub-core/loader/efi/linux.c | 12 +++- include/grub/efi/api.h | 2 ++ include/grub/efi/sb.h| 2 ++ 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/grub-core/kern

[PATCH v4 08/10] efi: Provide wrappers for load_image, start_image, unload_image

2024-06-12 Thread Mate Kukri
From: Julian Andres Klode These can be used to register a different implementation later, for example, when shim provides a protocol with those functions. Signed-off-by: Mate Kukri --- grub-core/kern/efi/efi.c | 57 ++ grub-core/loader/efi/chainloader.c

[PATCH v4 05/10] nx: add memory attribute get/set API

2024-06-12 Thread Mate Kukri
implementation that returns GRUB_ERR_NONE. On EFI platforms, it implements the primitives using the EFI Memory Attribute Protocol (defined in UEFI 2.10 specification). Original-Author: Peter Jones Signed-off-by: Mate Kukri --- grub-core/kern/efi/mm.c | 127 include

[PATCH v4 03/10] modules: Don't allocate space for non-allocable sections.

2024-06-12 Thread Mate Kukri
Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- grub-core/kern/dl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 0bf40caa6..37db9fab0 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern

[PATCH v4 09/10] efi: Use shim's loader protocol for EFI image verification and loading

2024-06-12 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/kern/efi/sb.c | 39 +--- grub-core/loader/efi/linux.c | 16 --- include/grub/efi/api.h | 5 + include/grub/efi/efi.h | 19 +++--- include/grub/efi/sb.h| 3 --- 5 files

[PATCH v4 01/10] modules: make .module_license read-only

2024-06-12 Thread Mate Kukri
t. Signed-off-by: Peter Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- include/grub/dl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/dl.h b/include/grub/dl.h index cd1f46c8b..750fc8d3d 100644 --- a/in

[PATCH v4 06/10] nx: set page permissions for loaded modules.

2024-06-12 Thread Mate Kukri
SHF_WRITE set, and clears the No eXecute flag on sections with SHF_EXECINSTR set. In all other cases it sets both flags. Original-Author: Peter Jones Original-Author: Robbie Harwood Original-Author: Laszlo Ersek Signed-off-by: Mate Kukri --- grub-core/kern/dl.c | 104

[PATCH v4 00/10] UEFI NX support and NX Linux loader using shim loader protocol

2024-06-12 Thread Mate Kukri
on future hardware). Julian Andres Klode (1): efi: Provide wrappers for load_image, start_image, unload_image Mate Kukri (6): modules: load module sections at page-aligned addresses nx: add memory attribute get/set API nx: set page permissions for loaded modules. nx: set the nx compatible

[PATCH v4 02/10] modules: strip .llvm_addrsig sections and similar.

2024-06-12 Thread Mate Kukri
* Note that the glob there won't work without a new enough linker, but the failure is just reversion to the status quo, so that's not a big problem. Signed-off-by: Peter Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- grub-core/genmod.sh.in

[PATCH v4 04/10] modules: load module sections at page-aligned addresses

2024-06-12 Thread Mate Kukri
are applied, so the relocations factor that in with no change. Original-Author: Peter Jones Original-Author: Laszlo Ersek Signed-off-by: Mate Kukri --- docs/grub-dev.texi | 6 ++--- grub-core/kern/arm/dl.c | 13 + grub-core/kern/arm64/dl.c | 13 + grub-core/kern/dl.c

[PATCH v4 07/10] nx: set the nx compatible flag in EFI grub images

2024-06-12 Thread Mate Kukri
- the binary knows how to use the EFI Memory Attributes protocol on code it is loading. This patch - adds a definition for the PE DLL Characteristics flag GRUB_PE32_NX_COMPAT - changes grub-mkimage to set that flag. Original-Author: Peter Jones Signed-off-by: Mate Kukri --- include/grub/efi/pe32.h

[PATCH 3/3] kern/efi/mm: Detect calls to grub_efi_drop_alloc() with wrong page counts

2024-06-12 Thread Mate Kukri
to double frees. Signed-off-by: Mate Kukri --- grub-core/kern/efi/mm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c index 661319194..d45d0e2ac 100644 --- a/grub-core/kern/efi/mm.c +++ b/grub-core/kern/efi/mm.c @@ -95,8

[PATCH 2/3] kern/efi/mm: Change grub_efi_allocate_pages_real() to call semantically correct free function

2024-06-12 Thread Mate Kukri
ere. Signed-off-by: Mate Kukri --- grub-core/kern/efi/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c index 4fec188ae..661319194 100644 --- a/grub-core/kern/efi/mm.c +++ b/grub-core/kern/efi/mm.c @@ -150,7 +15

[PATCH 1/3] kern/efi/mm: Change grub_efi_mm_add_regions() to keep track of map allocation size

2024-06-12 Thread Mate Kukri
map, and results in the heap getting trashed and the firmware ASSERTING on corrupted heap guard values when GRUB exits. Signed-off-by: Mate Kukri --- grub-core/kern/efi/mm.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern

[PATCH v3 04/10] modules: load module sections at page-aligned addresses

2024-06-03 Thread Mate Kukri
are applied, so the relocations factor that in with no change. Original-Author: Peter Jones Original-Author: Laszlo Ersek Signed-off-by: Mate Kukri --- docs/grub-dev.texi | 6 ++--- grub-core/kern/arm/dl.c | 13 + grub-core/kern/arm64/dl.c | 13 + grub-core/kern/dl.c

[PATCH v3 06/10] nx: set page permissions for loaded modules.

2024-06-03 Thread Mate Kukri
SHF_WRITE set, and clears the No eXecute flag on sections with SHF_EXECINSTR set. In all other cases it sets both flags. Original-Author: Peter Jones Original-Author: Robbie Harwood Original-Author: Laszlo Ersek Signed-off-by: Mate Kukri --- grub-core/kern/dl.c | 104

[PATCH v3 07/10] nx: set the nx compatible flag in EFI grub images

2024-06-03 Thread Mate Kukri
- the binary knows how to use the EFI Memory Attributes protocol on code it is loading. This patch - adds a definition for the PE DLL Characteristics flag GRUB_PE32_NX_COMPAT - changes grub-mkimage to set that flag. Original-Author: Peter Jones Signed-off-by: Mate Kukri --- include/grub/efi/pe32.h

[PATCH v3 02/10] modules: strip .llvm_addrsig sections and similar.

2024-06-03 Thread Mate Kukri
* Note that the glob there won't work without a new enough linker, but the failure is just reversion to the status quo, so that's not a big problem. Signed-off-by: Peter Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- grub-core/genmod.sh.in

[PATCH v3 10/10] efi: Disallow fallback to legacy Linux loader when shim says NX is required.

2024-06-03 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/kern/efi/sb.c | 27 +++ grub-core/loader/efi/linux.c | 12 +++- include/grub/efi/api.h | 2 ++ include/grub/efi/sb.h| 2 ++ 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/grub-core/kern

[PATCH v3 09/10] efi: Use shim's loader protocol for EFI image verification and loading

2024-06-03 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/kern/efi/sb.c | 39 +--- grub-core/loader/efi/linux.c | 16 --- include/grub/efi/api.h | 5 + include/grub/efi/efi.h | 19 +++--- include/grub/efi/sb.h| 3 --- 5 files

[PATCH v3 08/10] efi: Provide wrappers for load_image, start_image, unload_image

2024-06-03 Thread Mate Kukri
From: Julian Andres Klode These can be used to register a different implementation later, for example, when shim provides a protocol with those functions. Signed-off-by: Mate Kukri --- grub-core/kern/efi/efi.c | 57 ++ grub-core/loader/efi/chainloader.c

[PATCH v3 05/10] nx: add memory attribute get/set API

2024-06-03 Thread Mate Kukri
implementation that returns GRUB_ERR_NONE. On EFI platforms, it implements the primitives using the EFI Memory Attribute Protocol (defined in UEFI 2.10 specification). Original-Author: Peter Jones Signed-off-by: Mate Kukri --- grub-core/kern/efi/mm.c | 127 include

[PATCH v3 03/10] modules: Don't allocate space for non-allocable sections.

2024-06-03 Thread Mate Kukri
Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- grub-core/kern/dl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 0bf40caa6..37db9fab0 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern

[PATCH v3 01/10] modules: make .module_license read-only

2024-06-03 Thread Mate Kukri
t. Signed-off-by: Peter Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- include/grub/dl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/dl.h b/include/grub/dl.h index cd1f46c8b..750fc8d3d 100644 --- a/in

[PATCH v3 00/10] UEFI NX support and NX Linux loader using shim loader protocol

2024-06-03 Thread Mate Kukri
on future hardware). Julian Andres Klode (1): efi: Provide wrappers for load_image, start_image, unload_image Mate Kukri (6): modules: load module sections at page-aligned addresses nx: add memory attribute get/set API nx: set page permissions for loaded modules. nx: set the nx compatible

[PATCH v2 04/10] modules: load module sections at page-aligned addresses

2024-05-30 Thread Mate Kukri
are applied, so the relocations factor that in with no change. Original-Author: Peter Jones Original-Author: Laszlo Ersek Signed-off-by: Mate Kukri --- docs/grub-dev.texi | 6 ++--- grub-core/kern/arm/dl.c | 13 + grub-core/kern/arm64/dl.c | 13 + grub-core/kern/dl.c

[PATCH v2 03/10] modules: Don't allocate space for non-allocable sections.

2024-05-30 Thread Mate Kukri
Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- grub-core/kern/dl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 0bf40caa6..37db9fab0 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern

[PATCH v2 05/10] nx: add memory attribute get/set API

2024-05-30 Thread Mate Kukri
implementation that returns GRUB_ERR_NONE. On EFI platforms, it implements the primitives using the EFI Memory Attribute Protocol (defined in UEFI 2.10 specification). Original-Author: Peter Jones Signed-off-by: Mate Kukri --- grub-core/kern/efi/mm.c | 127 include

[PATCH v2 10/10] efi: Disallow fallback to legacy Linux loader when shim says NX is required.

2024-05-30 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/loader/efi/linux.c | 41 +++- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index 99365536a..e44692c92 100644 --- a/grub-core/loader/efi/linux.c

[PATCH v2 08/10] efi: Provide wrappers for load_image, start_image, unload_image

2024-05-30 Thread Mate Kukri
From: Julian Andres Klode These can be used to register a different implementation later, for example, when shim provides a protocol with those functions. Signed-off-by: Mate Kukri --- grub-core/kern/efi/efi.c | 57 ++ grub-core/loader/efi/chainloader.c

[PATCH v2 06/10] nx: set page permissions for loaded modules.

2024-05-30 Thread Mate Kukri
SHF_WRITE set, and clears the No eXecute flag on sections with SHF_EXECINSTR set. In all other cases it sets both flags. Original-Author: Peter Jones Original-Author: Robbie Harwood Original-Author: Laszlo Ersek Signed-off-by: Mate Kukri --- grub-core/kern/dl.c | 104

[PATCH v2 07/10] nx: set the nx compatible flag in EFI grub images

2024-05-30 Thread Mate Kukri
- the binary knows how to use the EFI Memory Attributes protocol on code it is loading. This patch - adds a definition for the PE DLL Characteristics flag GRUB_PE32_NX_COMPAT - changes grub-mkimage to set that flag. Original-Author: Peter Jones Signed-off-by: Mate Kukri --- include/grub/efi/pe32.h

[PATCH v2 09/10] efi: Use shim's loader protocol for EFI image verification and loading

2024-05-30 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/kern/efi/sb.c | 39 +--- grub-core/loader/efi/linux.c | 16 --- include/grub/efi/api.h | 5 + include/grub/efi/efi.h | 19 +++--- include/grub/efi/sb.h| 3 --- 5 files

[PATCH v2 02/10] modules: strip .llvm_addrsig sections and similar.

2024-05-30 Thread Mate Kukri
* Note that the glob there won't work without a new enough linker, but the failure is just reversion to the status quo, so that's not a big problem. Signed-off-by: Peter Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- grub-core/genmod.sh.in

[PATCH v2 00/10] UEFI NX support and NX Linux loader using shim loader protocol

2024-05-30 Thread Mate Kukri
on future hardware). Julian Andres Klode (1): efi: Provide wrappers for load_image, start_image, unload_image Mate Kukri (6): modules: load module sections at page-aligned addresses nx: add memory attribute get/set API nx: set page permissions for loaded modules. nx: set the nx compatible

[PATCH v2 01/10] modules: make .module_license read-only

2024-05-30 Thread Mate Kukri
t. Signed-off-by: Peter Jones Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Reviewed-By: Vladimir Serbinenko --- include/grub/dl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/dl.h b/include/grub/dl.h index cd1f46c8b..750fc8d3d 100644 --- a/in

Re: [PATCH 00/15] UEFI NX support and NX Linux loader using shim loader protocol

2024-05-24 Thread Mate Kukri
Hi Vladimir, Thanks for the reviews, I'll get back to addressing your comments next week. In the meantime, I am not sure what happened to patch 15/15, but I at least tried sending it, and it seems to be available in the archive here:

[PATCH 15/15] efi: Disallow fallback to legacy Linux loader when shim says NX is required.

2024-05-24 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/loader/efi/linux.c | 41 +++- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index 99365536a..e44692c92 100644 --- a/grub-core/loader/efi/linux.c

[PATCH 07/15] nx: set page permissions for loaded modules.

2024-05-24 Thread Mate Kukri
c74) Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Conflicts: grub-core/kern/dl.c (obvious) --- grub-core/kern/dl.c | 102 ++-- include/grub/dl.h | 44 +++ 2 files changed, 133 insertions(+), 13 deletions(-) diff --

[PATCH 03/15] modules: Don't allocate space for non-allocable sections.

2024-05-24 Thread Mate Kukri
Jones (cherry picked from commit 0f76b53f2fe86542123c7aa1ae39c90852972a99) Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri --- grub-core/kern/dl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 0bf40caa6..37db9fab0 100644 --- a/grub

[PATCH 02/15] modules: strip .llvm_addrsig sections and similar.

2024-05-24 Thread Mate Kukri
* Note that the glob there won't work without a new enough linker, but the failure is just reversion to the status quo, so that's not a big problem. Signed-off-by: Peter Jones (cherry picked from commit 0f66524e94d3c4f4d669d75c2122b0f1036776ea) Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate

[PATCH 08/15] nx: set the nx compatible flag in EFI grub images

2024-05-24 Thread Mate Kukri
a9ec858bd62b004c331cad9b5b00071d3081b626) Signed-off-by: Jan Setje-Eilers Conflicts: util/mkimage.c Signed-off-by: Mate Kukri --- util/mkimage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/mkimage.c b/util/mkimage.c index 4237383ac..9b4720e21 100644 --- a/util/mkimage.c +++ b/util

[PATCH 12/15] mm: Fixup bogus assumptions about types sizes in format strings

2024-05-24 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/kern/efi/mm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c index 46f2266e1..1064036f4 100644 --- a/grub-core/kern/efi/mm.c +++ b/grub-core/kern/efi/mm.c @@ -741,7 +741,7

[PATCH 06/15] nx: add memory attribute get/set API

2024-05-24 Thread Mate Kukri
nx primitives using it. Signed-off-by: Peter Jones [rharwood: add pjones's none/nyi fixup] Signed-off-by: Robbie Harwood (cherry picked from commit 45bfb1cc8316096a5ce1e58850ce5f8a6e0e100c) Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri Conflicts: grub-core/kern/efi/mm.c

[PATCH 10/15] grub_dl_set_mem_attrs(): add self-check for the tramp/GOT sizes

2024-05-24 Thread Mate Kukri
now, add a self-check that reports this bug (and prevents the crash by skipping the write protection). Example log after the patch: > kern/dl.c:742:BUG: trying to protect pages outside of module allocation > ("video_fb"): module base 0x13b87d000, size 0xe4f0; tramp/GOT base > 0x13b8

[PATCH 14/15] efi: Use shim's loader protocol for EFI image verification and loading

2024-05-24 Thread Mate Kukri
Signed-off-by: Mate Kukri --- grub-core/kern/efi/sb.c | 39 +--- grub-core/loader/efi/linux.c | 16 --- include/grub/efi/api.h | 5 + include/grub/efi/efi.h | 19 +++--- include/grub/efi/sb.h| 3 --- 5 files

[PATCH 04/15] pe: add the DOS header struct and fix some bad naming.

2024-05-24 Thread Mate Kukri
rom commit c850db5c0478c8328ebdd48ee8cce02995d4ead0) Signed-off-by: Jan Setje-Eilers Conflicts: grub-core/loader/arm64/linux.c (deleted) include/grub/efi/pe32.h (fixup) Signed-off-by: Mate Kukri --- include/grub/efi/pe32.h | 98 ++--- 1 file c

[PATCH 11/15] grub_dl_set_mem_attrs(): fix format string

2024-05-24 Thread Mate Kukri
tributes for GOT and trampolines ("video_fb") Fixes: ad1b904d325b (nx: set page permissions for loaded modules.) Signed-off-by: Laszlo Ersek (cherry picked from commit ee58dd70d627df54b806e94409673a11caab5a5d) Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri --- grub-core/kern/dl

[PATCH 13/15] efi: Provide wrappers for load_image, start_image, unload_image

2024-05-24 Thread Mate Kukri
From: Julian Andres Klode These can be used to register a different implementation later, for example, when shim provides a protocol with those functions. Signed-off-by: Mate Kukri --- grub-core/kern/efi/efi.c | 57 ++ grub-core/loader/efi/chainloader.c

[PATCH 01/15] modules: make .module_license read-only

2024-05-24 Thread Mate Kukri
t. Signed-off-by: Peter Jones (cherry picked from commit f6563e15bb490bb76a1a95cd3648fe03d1134d14) Signed-off-by: Jan Setje-Eilers Signed-off-by: Mate Kukri --- include/grub/dl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/dl.h b/include/grub/dl.h index

[PATCH 09/15] grub_dl_load_segments(): page-align the tramp/GOT areas too

2024-05-24 Thread Mate Kukri
(obvious) Signed-off-by: Mate Kukri --- grub-core/kern/dl.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c index 2784fae7a..9f31ad3b9 100644 --- a/grub-core/kern/dl.c +++ b/grub-core/kern/dl.c @@ -228,7

[PATCH 00/15] UEFI NX support and NX Linux loader using shim loader protocol

2024-05-24 Thread Mate Kukri
applicable. Julian Andres Klode (1): efi: Provide wrappers for load_image, start_image, unload_image Laszlo Ersek (3): grub_dl_load_segments(): page-align the tramp/GOT areas too grub_dl_set_mem_attrs(): add self-check for the tramp/GOT sizes grub_dl_set_mem_attrs(): fix format string Mate Kukri

[PATCH 05/15] modules: load module sections at page-aligned addresses

2024-05-24 Thread Mate Kukri
dl.c (obvious) Signed-off-by: Mate Kukri --- docs/grub-dev.texi | 6 +++--- grub-core/kern/arm/dl.c | 13 + grub-core/kern/arm64/dl.c | 13 + grub-core/kern/dl.c | 29 + grub-core/kern/emu/full.c

Re: Idea: Improve ext2 to allow for embedding

2024-03-13 Thread Mate Kukri
Hello, Do you have a proposed use-case for this in mind? On MBR disks there is usually enough space for core.img before the first partition. On GPT you can simply create a so-called "BIOS boot partition" to store core.img. But in either, BIOS is a legacy platform, so I doubt many new users of

[PATCH] efidisk: Breakup large reads into batches

2024-02-23 Thread Mate Kukri
From: David F Work around firmware bugs that cause large reads to fail from certain devices. Report-By: David F Signed-off-by: Mate Kukri --- grub-core/disk/efi/efidisk.c | 43 +--- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/grub-core/disk

OpenStack boot regressions caused by "ppc64: Restrict memory allocations for kernel and initrd"

2024-02-14 Thread Mate Kukri
if anything else is effected by this. Mate Kukri ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH] grub-install: Use `GRUB_DISTRIBUTOR` value as EFI boot option title

2024-02-01 Thread Mate Kukri
ase-sensitive prefix match as opposed to a case-insensitive substring search. - The Windows code just searches for an entry to re-use, or an empty entry to fill, but unlike Unix, the existing entries with a matching name are not deleted. Mate On Thu, Feb 1, 2024 at 9:29 AM Mate Kukri wrote:

[PATCH] grub-install: Use `GRUB_DISTRIBUTOR` value as EFI boot option title

2024-02-01 Thread Mate Kukri
- Allow entries to be called things like "Debian" and "Ubuntu". - If there is no `GRUB_DISTRIBUTOR` assume it is "GRUB". - When deleting previous boot options, allow matching against both the old "efi_distributor" value and the new "efi_title&quo

Re: [PATCH 2/3] osdep/unix/getroot.c: Clean up redundant code

2024-01-22 Thread Mate Kukri
to gain more memory protections, including un-mapped zero-page (alongside NX), it might even be a good idea to add more such assignments instead of removing them. Best regards, Mate Kukri On Sat, Jan 20, 2024 at 2:54 AM Alec Brown wrote: > > In grub-core/osdep/unix/getroot.c, coverity s

[PATCH] grub-core/Makefile.am: Make path to extra_deps.lst relative to $(top_srcdir)/grub-core

2023-12-08 Thread Mate Kukri
154dcb1aea9f8fc42b2bce98bebed004d7783a7d broke out of tree builds by introducing the extra_deps.lst file into the source tree but referencing it just by name in grub-core/Makefile.am. Signed-off-by: Mate Kukri --- grub-core/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] grub-install: Move platdir path canonicalization after files were copied to grubdir

2023-12-08 Thread Mate Kukri
The previous grub-install patch delaying the copying of files caused a regression when installing without an existing directory structure. This patch ensures that the platform directory actually exists by the time the code tries to canonicalize its filename. Signed-off-by: Mate Kukri --- util

[PATCH v2] grub-core/net/http.c: Fix gcc-13 errors relating to type signedness

2023-11-29 Thread Mate Kukri
Replace definition of `HTTP_PORT` with a pre-processor macro that converts the constant to the correct type `grub_uint16_t`. Change the defintion of local variable `port` in `http_establish()` to have the same type. Signed-off-by: Mate Kukri --- grub-core/net/http.c | 8 ++-- 1 file

[PATCH] grub-core/net/http.c: Fix gcc-13 errors relating to type signedness

2023-11-26 Thread Mate Kukri
Add explicit casts of HTTP_PORT to int to match the type of the port variable. Signed-off-by: Mate Kukri --- grub-core/net/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/net/http.c b/grub-core/net/http.c index df690acf6..d7b91c1f6 100644 --- a/grub-core

[PATCH v4] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-24 Thread Mate Kukri
the modules after at least some install_device validation was done, and thus reduces reliance on successful rollback. Signed-off-by: Mate Kukri --- util/grub-install.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/util/grub-install.c b/util

Re: [PATCH v3] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-23 Thread Mate Kukri
wrote: > > On Wed, Nov 22, 2023 at 11:53:13AM +, Mate Kukri wrote: > > Previously grub-install copied modules to grubdir before doing any > > validation on > > the install_device. > > > > When grub-install was called with an invalid install_device, modu

[PATCH v3] grub-install: Delay copying files to {grubdir, platdir} after install_device was validated.

2023-11-22 Thread Mate Kukri
the modules after at least some install_device validation was done, and thus reduces reliance on successful rollback. Signed-off-by: Mate Kukri Reviewed-by: Julian Andres Klode --- util/grub-install.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff

[PATCH v2] grub-install: Delay copying files to grubdir after install_device was validated.

2023-11-22 Thread Mate Kukri
Previously grub-install copied modules to grubdir before doing any validation on the install_device. When grub-install was called with an invalid install_device, modules were already copied to /boot before it found out and was forced to rely on atexit rollback. This patch delays copying the

[PATCH] grub-install: Delay copying files to grubdir after install_device was validated.

2023-11-21 Thread Mate Kukri
Previously grub-install copied modules to grubdir before doing any validation on the install_device. When grub-install was called with an invalid install_device, modules were already copied to /boot before it found out and was forced to rely on atexit rollback. This patch delays copying the