Re: [PATCH 04/19] mm: assert that we preserve header vs region alignment

2022-03-22 Thread Daniel Axtens
> s/struct grub_mm_region/grub_mm_region_t/ > s/struct grub_mm_header/grub_mm_header_t/ The problem is that grub_mm_{region,header}_t is a pointer type, not a struct type. So sizeof (grub_mm_region_t) == sizeof(void *). You also can't do sizeof (*grub_mm_region_t), because you can't dereference

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

2022-03-22 Thread Michael Chang via Grub-devel
On Tue, Mar 22, 2022 at 10:19:26PM +0100, Daniel Kiper wrote: > On Thu, Mar 17, 2022 at 02:43:41PM +0800, Michael Chang via Grub-devel wrote: > > The grub is failing to build with gcc-12 in many places like this: > > > > In function 'init_cbfsdisk', > > inlined from 'grub_mod_init' at

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

2022-03-22 Thread Daniel Kiper
On Thu, Mar 17, 2022 at 02:43:42PM +0800, Michael Chang via Grub-devel wrote: > 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 >

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

2022-03-22 Thread Daniel Kiper
On Thu, Mar 17, 2022 at 02:43:41PM +0800, Michael Chang via Grub-devel wrote: > 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

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

2022-03-22 Thread Daniel Kiper
On Thu, Mar 17, 2022 at 02:43:40PM +0800, Michael Chang via Grub-devel wrote: > 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

Re: [PATCH] kern/efi: Log a console error during a stack check failure

2022-03-22 Thread Daniel Kiper
On Mon, Mar 21, 2022 at 03:14:39PM +, Chris Coulson wrote: > The initial implementation of the stack protector just busy looped > in __stack_chk_fail in order to reduce the amount of code being > executed after the stack has been compromised because of a lack of > firmware memory protections.

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

2022-03-22 Thread Daniel Kiper
On Mon, Mar 21, 2022 at 12:18:33PM +, Darren Kenny wrote: > Hi Alec, > > These changes look good. For the series: > > Reviewed-by: Darren Kenny Same for me, Reviewed-by: Daniel Kiper ... Daniel ___ Grub-devel mailing list Grub-devel@gnu.org

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

2022-03-22 Thread Daniel Kiper
On Fri, Mar 18, 2022 at 01:57:39AM -0500, Glenn Washburn wrote: [...] > Actually, with your help, I figured out how to not have to exclude windows > builds, although I can only build test it. I think that is enough for now. We can think about testing later... Daniel

Re: [PATCH 0/3] Net fix and improvements

2022-03-22 Thread Daniel Kiper
On Fri, Mar 18, 2022 at 01:51:30AM -0500, Glenn Washburn wrote: > v2 updates: > * Use == NULL in conditionals > * Update commit messages to have more context from previous cover letter > > Glenn > > Glenn Washburn (3): > net: Unset grub_net_poll_cards_idle when net module has been unloaded >

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

2022-03-22 Thread Daniel Kiper
On Fri, Mar 18, 2022 at 01:34:05AM -0500, Glenn Washburn wrote: > Add linker flags when linking kernel.exec to have malloc and free point to > grub_malloc and grub_free respectively. Some gdb functionality depends on > gdb locating the symbols "malloc" and "free", such as dynamically creating >

Re: [PATCH 1/2] EFI: console: Do not set colorstate until the first text output

2022-03-22 Thread Daniel Kiper
On Fri, Mar 04, 2022 at 11:30:13AM +0100, Hans de Goede wrote: > Hi Daniel, > > On 1/28/22 12:43, Hans de Goede wrote: > > GRUB_MOD_INIT(normal) does an unconditional: > > > > grub_env_set ("color_normal", "light-gray/black"); > > > > which triggers a grub_term_setcolorstate() call. The original

Re: [PATCH 0/2] EFI/menu: Do not print messages when autobooting with TIMEOUT_STYLE_HIDDEN

2022-03-22 Thread Daniel Kiper
On Fri, Mar 04, 2022 at 11:36:30AM +0100, Hans de Goede wrote: > Hi Daniel, > > On 1/28/22 11:30, Hans de Goede wrote: > > Hi All, > > > > This series in essence is a renewed attempt to get grub to really > > be truly hidden when autobooting with TIMEOUT_STYLE_HIDDEN. > > > > This is something