grub:master

Last commit made on 2024-06-20
Get this branch:
git clone -b master https://git.launchpad.net/grub

Branch merges

Branch information

Name:
master
Repository:
lp:grub

Recent commits

b53ec06... by Thomas Schmitt

util/grub-mkrescue: Check existence of option arguments

As reported by Victoriia Egorova in bug 65880, grub-mkrescue does not
verify that the expected argument of an option like -d or -k does really
exist in argv. So, check the loop counter before incrementing it inside
the loop which copies argv to argp_argv. Issue an error message similar
to what older versions of grub-mkrescue did with a missing argument,
e.g. 2.02.

Fixes: https://savannah.gnu.org/bugs/index.php?65880

Signed-off-by: Thomas Schmitt <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

ab9fe80... by Tobias Heider

loader/efi/fdt: Add fdtdump command to access device tree

The fdtdump command allows dumping arbitrary device tree properties
and saving them to a variable similar to the smbios command.

This is useful in scripts where further actions such as selecting
a kernel or loading another device tree depend on the compatible
or model values of the device tree provided by the firmware.

For now only the root level properties of the dtb are exposed.

Signed-off-by: Tobias Heider <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

0cfec35... by phcoder

osdep/devmapper/getroot: Unmark 2 strings for translation

First they're use macros so they can't be translated as-is.
Second there is no point in translating them as they're too technical.

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

f171122... by phcoder

loader/emu/linux: Fix determination of program name

Current code works only if package matches binary name transformation rules.
It's often true but is not guaranteed.

Fixes: https://savannah.gnu.org/bugs/?64410

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

8287178... by phcoder

disk/cryptodisk: Fix translatable message

Fixes: https://savannah.gnu.org/bugs/?64408

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

9a2134a... by phcoder

tests: Add test for ZFS zstd

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

f96df6f... by phcoder

fs/zfs/zfs: Add support for zstd compression

Signed-off-by: Vladimir Serbinenko <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

55d35d6... by Mate Kukri

kern/efi/mm: Detect calls to grub_efi_drop_alloc() with wrong page counts

Silently keeping entries in the list if the address matches, but the
page count doesn't is a bad idea, and can lead to double frees.

grub_efi_free_pages() have already freed parts of this block by this
point, and thus keeping the whole block in the list and freeing it again
at exit can lead to double frees.

Signed-off-by: Mate Kukri <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

61f1d0a... by Mate Kukri

kern/efi/mm: Change grub_efi_allocate_pages_real() to call semantically correct free function

If the firmware happens to return 0 as an address of allocated pages,
grub_efi_allocate_pages_real() tries to allocate a new set of pages,
and then free the ones at address 0.

However at that point grub_efi_store_alloc() wasn't yet called, so
freeing the pages at 0 using grub_efi_free_pages() which calls
grub_efi_drop_alloc() isn't necessary, so let's call b->free_pages()
instead.

The call to grub_efi_drop_alloc() doesn't seem particularly harmful,
because it seems to do nothing if the allocation it is asked to drop
isn't on the list, but the call to it is obviously unnecessary here.

Signed-off-by: Mate Kukri <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>

dc0a3a2... by Mate Kukri

kern/efi/mm: Change grub_efi_mm_add_regions() to keep track of map allocation size

If the map was too big for the initial allocation, it was freed and replaced
with a bigger one, but the free call still used the hard-coded size.

Seems like this wasn't hit for a long time, because most firmware maps
fit into 12K.

This bug was triggered on Project Mu firmware with a big memory map, and
results in the heap getting trashed and the firmware ASSERTING on
corrupted heap guard values when GRUB exits.

Signed-off-by: Mate Kukri <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>