[PATCH 2/2] build: include missing header files in source tarball

2025-03-27 Thread Mike Gilbert
Fixes: 48e230c31 (key_protector: Add TPM2 Key Protector) Fixes: 99cda6788 (asn1_test: Test module for libtasn1) Signed-off-by: Mike Gilbert --- Makefile.util.def | 2 ++ grub-core/Makefile.core.def | 6 ++ 2 files changed, 8 insertions(+) diff --git a/Makefile.util.def b/Makefile.u

[PATCH 1/2] build: remove extra_deps.lst from EXTRA_DIST

2025-03-27 Thread Mike Gilbert
This file is auto-generated based on the selected platform and should not be included in the source tarball. Fixes: 6744840b (build: Track explicit module dependencies in Makefile.core.def) Signed-off-by: Mike Gilbert --- conf/Makefile.extra-dist | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH 3/5] loader/i386/linux: Fix resource leak

2025-03-27 Thread Daniel Kiper via Grub-devel
On Thu, Mar 27, 2025 at 09:19:03PM +0300, Vladimir 'phcoder' Serbinenko wrote: > > +      { > +       grub_errno = err; > +       goto fail; > +      } > grub_errno is already set. No need to set it again  I proposed that assignment to make it explicit but I am not going to ins

RE: [PATCH v2 3/3] blsuki: Add uki command to load Unified Kernel Image entries

2025-03-27 Thread Alec Brown via Grub-devel
On Wed, Mar 26, 2025 at 5:43 AM, Vladimir 'phcoder' Serbinenko wrote: >> >> >> >> +#ifdef GRUB_MACHINE_EFI >> +#include >> +#include >> +#include >> +#endif >> + >> > Can UKI work without EFI? I think of scenario of putting e.g. EFI disk into > coreboot or BIOS machine. No UKI only works EFI

RE: [PATCH v2 2/3] blsuki: Check for mounted /boot in emu

2025-03-27 Thread Alec Brown via Grub-devel
On Tue, Mar 25, 2025 at 8:26 AM, Vladimir 'phcoder' Serbinenko wrote: > Le mar. 25 mars 2025, 10:15, Alec Brown a écrit : > >> Irritatingly, BLS defines paths relatives to the mountpoint of the >> filesystem which contains its snippets, not / or any other fixed >> location. So grub2-emu needs to

Re: [PATCH GRUB] fs/xfs: fix large extent counters incompat feature support

2025-03-27 Thread Eric Sandeen via Grub-devel
Grub folks, ping on this? It has 2 reviews and testing but I don't see it merged yet. Thanks, -Eric On 12/4/24 7:50 AM, Eric Sandeen wrote: > When large extent counter / NREXT64 support was added to grub, it missed > a couple of direct reads of nextents which need to be changed to the new > NREXT

Re: [PATCH 3/5] loader/i386/linux: Fix resource leak

2025-03-27 Thread Vladimir 'phcoder' Serbinenko
> > > + { > + grub_errno = err; > + goto fail; > + } > grub_errno is already set. No need to set it again > initrd_mem = get_virtual_current_address (ch); > initrd_mem_target = get_physical_target_address (ch); >} > -- > 2.34.1 > > >

Re: [PATCH 1/5] disk/ldm: Fix memory leaks

2025-03-27 Thread Vladimir 'phcoder' Serbinenko
Reviewed-By : Vladimir Serbinenko Le jeu. 27 mars 2025, 20:57, Lidong Chen via Grub-devel a écrit : > Fix memory leaks in make_vg() with new helper functions, free_pv() > and free_lv(). Additionally, correct a check after allocating > comp->segments->nodes that mistakenly checked lv->segments->n

Re: [PATCH 5/5] loader/xnu: Fix memory leak

2025-03-27 Thread Vladimir 'phcoder' Serbinenko
Reviewed-By : Vladimir Serbinenko Le jeu. 27 mars 2025, 20:57, Lidong Chen via Grub-devel a écrit : > In grub_xnu_load_kext_from_dir(), when the call to grub_device_open() > failed, it simply cleaned up previously allocated memory and returned > GRUB_ERR_NONE. However, it neglected to free ctx->

Re: [PATCH 4/5] fs/btrfs: Fix memory leaks

2025-03-27 Thread Vladimir 'phcoder' Serbinenko
Reviewed-By : Vladimir Serbinenko Le jeu. 27 mars 2025, 20:57, Lidong Chen via Grub-devel a écrit : > Fix memory leaks in grub_btrfs_extent_read() and > grub_btrfs_dir(). > > Fixes: CID 473842 > Fixes: CID 473871 > > Signed-off-by: Lidong Chen > --- > grub-core/fs/btrfs.c | 6 +- > 1 file

Re: [PATCH 2/5] lib/reloacator: Fix memory leaks

2025-03-27 Thread Vladimir 'phcoder' Serbinenko
Reviewed-By : Vladimir Serbinenko Le jeu. 27 mars 2025, 20:57, Lidong Chen via Grub-devel a écrit : > Fix memory leaks in grub_relocator_alloc_chunk_align(). > > Fixes: CID 473844 > > Signed-off-by: Lidong Chen > --- > grub-core/lib/relocator.c | 6 +- > 1 file changed, 5 insertions(+), 1

[PATCH 3/5] loader/i386/linux: Fix resource leak

2025-03-27 Thread Lidong Chen via Grub-devel
In grub_cmd_initrd(), initrd_ctx is allocated before calling grub_relocator_alloc_chunk_align(). When that function fails, initrd_ctx should be freed before exiting grub_cmd_initrd(). Fixes: CID 473852 Signed-off-by: Lidong Chen --- grub-core/loader/i386/linux.c | 5 - 1 file changed, 4 ins

[PATCH 1/5] disk/ldm: Fix memory leaks

2025-03-27 Thread Lidong Chen via Grub-devel
Fix memory leaks in make_vg() with new helper functions, free_pv() and free_lv(). Additionally, correct a check after allocating comp->segments->nodes that mistakenly checked lv->segments->nodes instead, likely due to a copy-paste error. Fixes: CID 473878 Fixes: CID 473884 Fixes: CID 473889 Fixes:

[PATCH 4/5] fs/btrfs: Fix memory leaks

2025-03-27 Thread Lidong Chen via Grub-devel
Fix memory leaks in grub_btrfs_extent_read() and grub_btrfs_dir(). Fixes: CID 473842 Fixes: CID 473871 Signed-off-by: Lidong Chen --- grub-core/fs/btrfs.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index 9c1e925c9..7bf8d9

[PATCH 0/5] Fix memory leaks

2025-03-27 Thread Lidong Chen via Grub-devel
These patches address memory leaks identified by Coverity. Lidong Chen (5): disk/ldm: Fix memory leaks lib/reloacator: Fix memory leaks loader/i386/linux: Fix resource leak fs/btrfs: Fix memory leaks loader/xnu: Fix memory leak grub-core/disk/ldm.c | 180 +++---

[PATCH 2/5] lib/reloacator: Fix memory leaks

2025-03-27 Thread Lidong Chen via Grub-devel
Fix memory leaks in grub_relocator_alloc_chunk_align(). Fixes: CID 473844 Signed-off-by: Lidong Chen --- grub-core/lib/relocator.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c index e0478ae5b..3306a1bb7 100644 ---

[PATCH 5/5] loader/xnu: Fix memory leak

2025-03-27 Thread Lidong Chen via Grub-devel
In grub_xnu_load_kext_from_dir(), when the call to grub_device_open() failed, it simply cleaned up previously allocated memory and returned GRUB_ERR_NONE. However, it neglected to free ctx->newdirname which is allocated before the call to grub_device_open(). Fixes: CID 473859 Signed-off-by: Lidon

[PATCH] configure: Add -mno-relax on riscv*

2025-03-27 Thread Vladimir Serbinenko
Without this option compiler sometimes emits R_RISCV_ALIGN relocs. Unlike other relocs this one requires the linker to do NOP deletions and we can't ignore them. Just instruct compiler not to emit them Signed-off-by: Vladimir Serbinenko --- configure.ac | 25 + 1 file cha

[PATCH] Add convenience TARGET_CROSS

2025-03-27 Thread Vladimir Serbinenko
Setting all TARGET_* variables is cumbersome. This convenience macro allows to set them all in one go Signed-off-by: Vladimir Serbinenko --- configure.ac | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index ad1e7bea5..34f4f9415 100644 -