Re: Re: [PATCH] net: fix null pointer dereference when parsing ICMP6_ROUTER_ADVERTISE messages

2022-03-16 Thread zhangqiumiao via Grub-devel
On Thu, Feb 17, 2022 at 03:32:52PM -0600, Glenn Washburn wrote: > On Thu, 17 Feb 2022 21:48:58 +0800 > Qiumiao Zhang via Grub-devel wrote: > > > During UEFI PXE boot in IPv6 network, if the DHCP server adopts > > stateful automatic configuration, when the client receives the > > ICMP6_ROUTER_ADV

[PATCH 1/2] grub-mkimage: Only check aarch64 relocations when built for aarch64

2022-03-16 Thread Darren Kenny
Coverity flagged the switch checks for R_AARCH64_* as being logically dead code, since it could never happen on x86 due to the masking of the values earlier in the code. A check for building on __ARM_ARCH (which gcc and clang define) and for MKIMAGE_ELF64 (which GRUB defines) has been added to avo

[PATCH 2/2] kern: Ensure that parser allocated memory is not leaked

2022-03-16 Thread Darren Kenny
While it would appear unlikely that the memory allocated in *argv in grub_parser_split_cmdline() would be leaked, we should try ensure that it doesn't leak by calling grub_free() before we return from grub_rescue_parse_line(). To avoid a possible double-free, grub_parser_split_cmdline() is being c

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

2022-03-16 Thread Daniel Kiper
On Tue, Mar 15, 2022 at 02:05:37PM -0400, Robbie Harwood wrote: > 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 (

Re: [PATCH 1/2] grub-mkimage: Only check aarch64 relocations when built for aarch64

2022-03-16 Thread Daniel Kiper
On Wed, Mar 16, 2022 at 05:25:04PM +, Darren Kenny wrote: > Coverity flagged the switch checks for R_AARCH64_* as being logically > dead code, since it could never happen on x86 due to the masking of the > values earlier in the code. > > A check for building on __ARM_ARCH (which gcc and clang d

Re: [PATCH 2/2] kern: Ensure that parser allocated memory is not leaked

2022-03-16 Thread Daniel Kiper
On Wed, Mar 16, 2022 at 05:25:05PM +, Darren Kenny wrote: > While it would appear unlikely that the memory allocated in *argv in > grub_parser_split_cmdline() would be leaked, we should try ensure that > it doesn't leak by calling grub_free() before we return from > grub_rescue_parse_line(). >

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

2022-03-16 Thread Daniel Kiper
On Tue, Mar 15, 2022 at 02:36:12PM -0500, Glenn Washburn wrote: > On Tue, 15 Mar 2022 14:23:48 +0100 > Daniel Kiper wrote: > > > 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 +

[PATCH] util/grub.d/10_linux: Improve initramfs detection

2022-03-16 Thread Oskari Pirhonen
Prefer using a *.old initramfs for *.old kernels if it exists. Otherwise look for an initramfs without the suffix. Also add detection for initramfs of the form *.img.old. For example, Gentoo's sys-kernel/genkernel installs it as initramfs-*.img and moves any existing one to initramfs-*.img.old. S

Re: [PATCH 6/6] INSTALL: Add more cross-compiling Debian packages

2022-03-16 Thread Paul Menzel
Dear Daniel, Am 11.03.22 um 00:36 schrieb Daniel Kiper: The mingw-w64-tools is especially important because with out it some without Windows builds may fail due to lack of proper pkg-config. Signed-off-by: Daniel Kiper --- INSTALL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 0/3] Fix GCC 12 build error

2022-03-16 Thread Michael Chang via Grub-devel
The tested gcc version is: abuild@mazu:~> gcc --version gcc (SUSE Linux) 12.0.1 20220307 (experimental) [revision 40c1d4a07e5798c01e4364336c9617550744861d] Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; n

[PATCH 1/3] mkimage: Fix dangling pointer may be used error

2022-03-16 Thread Michael Chang via Grub-devel
The warning is real as long as dangling pointer to 'tmp_' may be used if o32 and o64 are both null. However that is not going to happen and can be ignored safely because the PE_OHDR is being used in a context that either o32 or o64 must have been properly initialized. Sadly compiler seems not to al

[PATCH 2/3] Fix -Werror=array-bounds array subscript 0 is outside array bounds

2022-03-16 Thread Michael Chang via Grub-devel
The grub is failing to build with gcc-12 in many places like this: In function 'init_cbfsdisk', inlined from 'grub_mod_init' at ../../grub-core/fs/cbfs.c:391:3: ../../grub-core/fs/cbfs.c:345:7: error: array subscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]'} [-Wer

[PATCH 3/3] reed_solomon: Fix array subscript 0 is outside array bounds

2022-03-16 Thread Michael Chang via Grub-devel
The grub_absolute_pointer() is a compound expression that can only work within a function. We are out of luck here when the pointer variables require global definition due to ATTRIBUTE_TEXT that have to use fully initialized global definition because of the way linkers work. static gf_single_t *