Re: [PATCH] diskfilter: don't make a RAID array with more than 1024 disks

2022-10-20 Thread Daniel Kiper
On Wed, Oct 19, 2022 at 08:23:22PM +1100, Daniel Axtens wrote: > This is 'belt and braces' with commit 12e20a6a695f ("disk/diskfilter: > Check calloc() result for NULL"): we end up trying to use too much memory > in situations like corrupted Linux software raid setups purporting to > use a huge num

Re: [PATCH v4 2/2] mm: Better handling of adding new regions

2022-10-20 Thread Daniel Kiper
On Sat, Oct 15, 2022 at 10:15:12PM +0800, Zhang Boyang wrote: > Previously, there are two problems of the handling of adding new Please drop "Previously". It is not needed... > regions. First, it doesn't take region management cost into account. > Adding a memory area of `x` bytes will result in

Re: [RFC PATCH v3 2/2] mm: Separate different types of allocations into different regions

2022-10-20 Thread Daniel Kiper
On Sat, Oct 15, 2022 at 11:00:35AM +0200, Patrick Steinhardt wrote: > On Thu, Oct 13, 2022 at 09:29:19AM +0800, Zhang Boyang wrote: > > This patch add type infomation to heap regions. Currently there are four > > types: GRUB_MM_SIZE_SMALL, GRUB_MM_SIZE_LARGE, GRUB_MM_CLASS_DATA, > > GRUB_MM_CLASS_M

Re: [PATCH] multiboot: fix memory leak

2022-10-20 Thread Daniel Kiper
On Sat, Oct 15, 2022 at 06:41:12PM +0800, t.feng via Grub-devel wrote: > follow up the commit: > eb33e61b31902a5493468895aaf83fa0b4f5f59d > > it seems that old commit can not fix memory leak completely. The commit message should look more or less like that: The commit eb33e61b3 (multiboot: fix me

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

2022-10-20 Thread Olaf Hering
Tue, 18 Oct 2022 21:53:32 -0700 Denton Liu : > On Tue, Oct 18, 2022 at 04:18:21PM +0200, Olaf Hering wrote: > > Maybe the patch description lacks a specific example how the proposed > > change is supposed to be used in your environment. > My patch description says: > Introduce the GRUB_TO

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

2022-10-20 Thread Daniel Kiper
On Wed, Oct 19, 2022 at 02:50:00PM -0400, Robbie Harwood wrote: > From: Raymund Will > > The GRUB emulator is used as a debugging utility but it could also be > used as a user-space bootloader if there is support to boot an operating > system. > > The Linux kernel is already able to (re)boot anoth

Re: Adding --set to videoinfo to retrieve current video resolution

2022-10-20 Thread Daniel Kiper
Adding Paul, Vladimir, and Zhang... On Wed, Oct 12, 2022 at 03:36:13PM +0200, Markus Scholz wrote: > Dear Grub Developers, > > recently we faced the problem the author in this old thread faced: > - https://lists.gnu.org/archive/html/grub-devel/2012-10/msg9.html > > Ie. our theme wouldn't displ

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

2022-10-20 Thread Robbie Harwood
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 >> --- a/grub-core/kern/emu/misc.c >> +++ b/grub-core/kern/emu/misc.c >> @@ -39,6 +39,7 @@ >> #inc

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

2022-10-20 Thread Alec Brown
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 file size, so this check is b

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

2022-10-20 Thread Alec Brown
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 after resolving the first bug, there isn't a CID for the second bug

[PATCH 1/2] video/readers: Add artificial limit to image dimensions

2022-10-20 Thread Alec Brown
In grub-core/video/readers/jpeg.c, the height and width of a JPEG image don't have an upper limit for how big the JPEG image can be. In coverity, this is getting flagged as an untrusted loop bound. This issue can also seen in PNG and TGA format images as well but coverity isn't flagging it. To prev

Re: [PATCH v7 1/1] plainmount: Support plain encryption mode

2022-10-20 Thread Glenn Washburn
On Sun, 18 Sep 2022 19:46:03 + Maxim Fomin wrote: > From 687f8687f7c72ac91e250c9b89659f69b3644bfb Mon Sep 17 00:00:00 2001 > From: Maxim Fomin > Date: Sun, 18 Sep 2022 19:43:12 +0100 > Subject: [PATCH v7 1/1] plainmount: Support plain encryption mode > > This patch adds support for plain en

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

2022-10-20 Thread Glenn Washburn
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: Glenn Washburn --- Range-diff against v1: 1: 5832522ca2 ! 1: 3e6c866d87 cmp: Only