Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-21 Thread Denton Liu
Hi Olaf, On Thu, Oct 20, 2022 at 05:13:06PM +0200, Olaf Hering wrote: > After reading the patch again, the newly added documentation states: > "This option should be a path to a kernel image." > > I think it needs to be more specific: is it expecting an absolute path, or > just the basename of

Re: [PATCH v2 0/3] Fix building with clang

2022-10-21 Thread Daniel Kiper
On Fri, Oct 21, 2022 at 01:32:58PM +, Darren Kenny wrote: > The abiltiy to build with clang was broken in the last release after the > upgrade of gnulib, but it would also appear to have been broken too with > versions of clang prior to 8.0.0. > > There were two main issues: > > - The use of

Re: [PATCH 2/2] video/readers/jpeg: Check next_marker is within file size

2022-10-21 Thread Daniel Axtens
Alec Brown writes: > In grub-core/video/readers/jpeg.c, the function grub_jpeg_decode_huff_table() > has the variable next_marker which reads data from grub_jpeg_get_word() and > then uses it as an upper limit in a while loop. However, the function isn't > checking that next_marker is within the

[PATCH v2 1/3] gnulib: Provide abort() implementation for gnulib

2022-10-21 Thread Darren Kenny
The recent gnulib updates require an implemention of abort(), but the current macro provided by changeset: cd37d3d3916c gnulib: Drop no-abort.patch to config.h.in does not work with the clang compiler since it doesn't provide a __builtin_trap implementation, so this element of the changeset

[PATCH v2 3/3] build: Update to reflect minimum clang version 8.0

2022-10-21 Thread Darren Kenny
After doing some validation with clang from versions 3.8 and up, the builds prior to version 8.0.0 fail due to the use of safemath functions at link time. Signed-off-by: Darren Kenny fix Signed-off-by: Darren Kenny --- INSTALL | 2 +- include/grub/safemath.h | 6 +++--- 2

[PATCH v2 0/3] Fix building with clang

2022-10-21 Thread Darren Kenny
The abiltiy to build with clang was broken in the last release after the upgrade of gnulib, but it would also appear to have been broken too with versions of clang prior to 8.0.0. There were two main issues: - The use of __builtin_trap in the abort() macro. This builtin doesn't exist for

[PATCH v2 2/3] configure: Fix building with clang

2022-10-21 Thread Darren Kenny
Building the current code with clang and the latest gnulib fails due to the use of a variable-length-array (vla) warning, which turns in to an error due to the presence of the -Werror during the build. The gnulib team stated that their code should not be built with -Werror. At present, the only

Re: [PATCH v5 0/6] linux: implement LoadFile2 initrd loading

2022-10-21 Thread Ard Biesheuvel
On Fri, 21 Oct 2022 at 14:51, Daniel Kiper wrote: > > On Tue, Oct 18, 2022 at 09:05:01PM +0200, Ard Biesheuvel wrote: > > This implements the LoadFile2 initrd loading protocol, which is > > essentially a callback interface into the bootloader to load the initrd > > data into a caller provided

Re: [PATCH v5 0/6] linux: implement LoadFile2 initrd loading

2022-10-21 Thread Daniel Kiper
On Tue, Oct 18, 2022 at 09:05:01PM +0200, Ard Biesheuvel wrote: > This implements the LoadFile2 initrd loading protocol, which is > essentially a callback interface into the bootloader to load the initrd > data into a caller provided buffer. This means the bootloader no longer > has to contain any

Re: [PATCH v5 1/1] Add support for grub-emu to kexec Linux menu entries

2022-10-21 Thread Daniel Kiper
On Thu, Oct 20, 2022 at 03:20:58PM -0400, Robbie Harwood wrote: > Daniel Kiper writes: > > > On Wed, Oct 19, 2022 at 02:50:00PM -0400, Robbie Harwood wrote: > > > >> diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c > >> index d0e7a107e7..521220b49d 100644 > >> ---

Re: [PATCH 0/2] Fix Coverity untrusted loop bound bugs in jpeg.c

2022-10-21 Thread Daniel Kiper
On Thu, Oct 20, 2022 at 05:11:12PM -0400, Alec Brown wrote: > In grub-core/video/readers/jpeg.c, Coverity identified an untrusted loop bound > bug. After resolving this bug, a private Coverity scan identified another > untrusted loop bound bug in a different function. Since this bug only shows up

Re: [PATCH v2] cmp: Only return success when both files have the same contents

2022-10-21 Thread Daniel Kiper
On Thu, Oct 20, 2022 at 11:46:26PM -0500, Glenn Washburn wrote: > From: Li Gen > > This allows the cmp command to be used in GRUB scripts to conditionally > run commands based on whether two files are the same. > > Update documentation accordingly. > > Signed-off-by: Li Gen > Signed-off-by: