Re: [PATCH] gdb: Add malloc and free symbols to kernel.exec to improve gdb functionality

2022-03-15 Thread Daniel Kiper
On Fri, Mar 11, 2022 at 12:09:58AM +0100, Daniel Kiper wrote: > On Wed, Mar 09, 2022 at 02:25:28PM -0600, Glenn Washburn wrote: > > On Wed, 9 Mar 2022 16:49:57 +0100 > > Daniel Kiper wrote: > > > > > On Wed, Mar 02, 2022 at 06:25:12PM -0600, Glenn Washburn wrote: > > > > Add linker flags when link

Re: [PATCH 3/6] commands/i386/pc/sendkey: Fix "writing 1 byte into a region of size 0" build error

2022-03-15 Thread Daniel Kiper
On Mon, Mar 14, 2022 at 12:16:16PM +0800, Michael Chang wrote: > On Fri, Mar 11, 2022 at 12:35:57AM +0100, Daniel Kiper wrote: > > Latest GCC may complain in that way: > > > > commands/i386/pc/sendkey.c: In function ‘grub_sendkey_postboot’: > > commands/i386/pc/sendkey.c:223:21: error: writing

[PATCH v9 1/8] Use visual indentation in config.h.in

2022-03-15 Thread Robbie Harwood
Signed-off-by: Robbie Harwood --- config.h.in | 56 ++--- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/config.h.in b/config.h.in index c1323a88e..4d4cc74cb 100644 --- a/config.h.in +++ b/config.h.in @@ -26,46 +26,46 @@ #define MI

[PATCH v9 3/8] Drop gnulib fix-base64.patch

2022-03-15 Thread Robbie Harwood
Originally added in 9fbdec2f6b4fa8b549daa4d49134d1fe89d95ef9 and subsequently modified in 552c9fd08122a3036c724ce96dfe68aa2f75705f, fix-base64.patch handled two problems we have using gnulib, which are exerciesd by the base64 module but not directly caused by it. First, grub2 defines its own bool

[PATCH v9 6/8] Handle warnings introduced by updated gnulib

2022-03-15 Thread Robbie Harwood
- Fix type of size variable in luks2_verify_key() - Avoid redefinition of SIZE_MAX and ATTRIBUTE_ERROR - Work around gnulib's int types on older compilers Signed-off-by: Robbie Harwood --- config.h.in | 5 + grub-core/disk/luks2.c| 4 ++-- grub-core/lib/posi

[PATCH v9 4/8] Drop gnulib no-abort.patch

2022-03-15 Thread Robbie Harwood
Originally added in db7337a3d353a817ffe9eb4a3702120527100be9, this patched out all relevant invocations of abort() in gnulib. While it was not documented why at the time, testing suggests that there's no abort() implementation available for gnulib to use. gnulib's position is that the use of abor

[PATCH v9 7/8] Fix various new autotools warnings

2022-03-15 Thread Robbie Harwood
Signed-off-by: Robbie Harwood --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f8cc79e4d..3ffbc7c57 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,7 @@ dnl description of the relationships between them. AC_I

[PATCH v9 2/8] Where present, ensure config-util.h precedes config.h

2022-03-15 Thread Robbie Harwood
gnulib defines go in config-util.h, and we need to know whether to provide duplicates in config.h or not. Signed-off-by: Robbie Harwood --- grub-core/disk/host.c| 2 +- grub-core/gensymlist.sh | 1 + grub-core/kern/emu/argp_common.c | 2 +- grub-core/kern/emu/mai

[PATCH v9 8/8] lib/posix_wrap/errno.h: Add __set_errno() macro

2022-03-15 Thread Robbie Harwood
From: Daniel Kiper $ ./configure --target=x86_64-w64-mingw32 --with-platform=efi --host=x86_64-w64-mingw32 $ make [...] cat syminfo.lst | sort | gawk -f ./genmoddep.awk > moddep.lst || (rm -f moddep.lst; exit 1) __imp__errno in regexp is not defined This happens because grub-core/lib/gnulib/

[PATCH v9 5/8] Update gnulib version and drop most gnulib patches

2022-03-15 Thread Robbie Harwood
In addition to the changes carried in our gnulib patches, several Coverity and code hygiene fixes that were previously downstream are also included in this 3-year gnulib increment. Unfortunately, fix-width.patch is retained. Bump minimum autoconf version from 2.63 to 2.64 and automake from 1.11 t

[PATCH v9 0/8] Update gnulib version and drop most gnulib patches

2022-03-15 Thread Robbie Harwood
This update adds two patches (dkiper's __set_errno() and my autotools warnings fix). There are not changes to other patches in the series (except maybe things introduced by git rebase). Be well, --Robbie Daniel Kiper (1): lib/posix_wrap/errno.h: Add __set_errno() macro Robbie Harwood (7): U

[PATCH 0/7] Fix coverity uninitialized scalar variable bugs in grub-core

2022-03-15 Thread Alec Brown
Coverity identified multiple uninitialized scalar variable bugs in multiple components of the grub-core. These patches address these issues. The Coverity bugs being addressed are: CID 375026 CID 375028 CID 375030 CID 375031 CID 375033 CID 375035 CID 375036 Alec Brown (7): grub-core/loader/i

[PATCH 3/7] grub-core/net/arp.c: Fix uninitialized scalar variable

2022-03-15 Thread Alec Brown
In the function grub_net_arp_receive(), grub_net_network_level_address_t sender_addr and target_addr are being called but aren't being initialized. To prevent contents of these structures from being filled with junk data from the stack, we can initialize them to 0 by setting sender_addr and target_

[PATCH 1/7] grub-core/loader/i386/bsd.c: Fix uninitialized scalar variable

2022-03-15 Thread Alec Brown
In the function grub_netbsd_setup_video(), struct grub_netbsd_btinfo_framebuf params is called but isn't being initialized. To prevent contents of this structure from being filled with junk data from the stack, we can initialize it to 0 by setting params to {}. Fixes: CID 375026 Signed-off-by: A

[PATCH 5/7] grub-core/net/net.c: Fix uninitialized scalar variable

2022-03-15 Thread Alec Brown
In the function grub_net_ipv6_get_link_local(), grub_net_network_level_address_t addr is called but isn't being initialized. To prevent contents of this structure from being filled with junk data from the stack, we can initialize it to 0 by setting addr to {}; Fixes: CID 375033 Signed-off-by: Ale

[PATCH 4/7] grub-core/loader/i386/xnu.c: Fix uninitialized scalar variable

2022-03-15 Thread Alec Brown
In the function grub_xnu_boot_resume(), struct grub_relocator32_state state is called but isn't being initialized. To prevent contents of this structure from being filled with junk data from the stack, we can initialize it to 0 by setting state to {}. Fixes: CID 375031 Signed-off-by: Alec Brown

[PATCH 2/7] grub-core/loader/i386/pc/linux.c: Fix uninitialized scalar variable

2022-03-15 Thread Alec Brown
In the function grub_linux16_boot(), struct grub_relocator16_state state is called but isn't being initialized. To prevent contents of this structure from being filled with junk data from the stack, we can initialize it to 0 by setting state to {}; Fixes: CID 375028 Signed-off-by: Alec Brown ---

[PATCH 6/7] grub-core/loader/i386/xnu.c: Fix uninitialized scalar variable

2022-03-15 Thread Alec Brown
In the function grub_xnu_boot(), struct grub_relocator32_state state is called but isn't being initialized. To prevent contents of this structure from being filled with junk data from the stack, we can initialize it to 0 by setting state to {}. Fixes: CID 375035 Signed-off-by: Alec Brown --- gr

[PATCH 7/7] grub-core/net/bootp.c: Fix uninitialized scalar variable

2022-03-15 Thread Alec Brown
In the function grub_net_configure_by_dhcp_ack(), grub_net_network_level_address_t addr is called but isn't being initialized. To prevent contents of this structure from being filled with junk data from the stack, we can initialize it to 0 by setting addr to {}. Fixes: CID 375036 Signed-off-by: A

Re: [PATCH 0/7] Fix coverity uninitialized scalar variable bugs in grub-core

2022-03-15 Thread Darren Kenny
Hi Alec, Thanks for doing these changes, it all looks good, so for the series: Reviewed-by: Darren Kenny Thanks, Darren. On Tuesday, 2022-03-15 at 16:24:02 -04, Alec Brown wrote: > Coverity identified multiple uninitialized scalar variable bugs in multiple > components of the grub-core. These