Re: [PATCH 3/4] types: Split aligned and packed guids
> These casts looks strange for me. Could not we change the functions > declarations in the grub_efi_runtime_services? If not I think this > change should be explained in the commit message. New commit message: types: Split aligned and packed guids On ia64 alignment requirements are strict. When we pass a pointer to UUID it needs to be at least 4-byte aligned or EFI will crash. On the other hand in device path there is no padding for UUID, so we need 2 types in one formor another. Make 4-byte aligned and unaligned types The code is structured in a way to accept unaligned inputs in most cases and supply 4-byte aligned outputs. Efiemu case is a bit ugly because there inputs and outputs are reversed and so we need careful casts to account for this inversion. Signed-off-by: Vladimir Serbinenko -- Regards Vladimir 'phcoder' Serbinenko ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] fs/xfs: add large extent counters incompat feature support
On 2023-11-06 19:17:17 [+0100], Daniel Kiper wrote: > Sebastian, did you have a chance to test this patch? Just did so. Tested-by: Sebastian Andrzej Siewior I had the previous two plus this one. Did the previous two get merged in the meaintime or are they still undere review? > Daniel Sebastian ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] acpi: Mark MADT entries as packed.
Le lun. 6 nov. 2023, 18:04, Daniel Kiper a écrit : > On Tue, Oct 31, 2023 at 08:20:14PM +0100, Vladimir 'phcoder' Serbinenko > wrote: > > From 9d03ab04df3b723058fb0b7c30576e1330cbad5d Mon Sep 17 00:00:00 2001 > > From: Vladimir Serbinenko > > Date: Tue, 31 Oct 2023 18:27:19 +0100 > > Subject: [PATCH] acpi: Mark MADT entries as packed. > > > > No alignment is guaranteed and in fact on my ia64 sapic is aligned > > to 4 bytes instead of 8 and causes a trap. It affects only rarely used > > lsacpi command and so went unnoticed. > > At least you missed grub_acpi_madt_entry_header struct. It should have > packed attribute too. > Nope. It has only uint8. So no need for packed > > Daniel > ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v2] gzio: Avoid spurious failures
On Tue, Oct 31, 2023 at 08:53:41PM +0100, Vladimir 'phcoder' Serbinenko wrote: > On Tue, Oct 31, 2023 at 7:28 PM Jason Andryuk wrote: > > > > grub_gzio_read_real() uses grub_errno to identify decompression failures > > when the function completes. Its callees in gzio.c are void-returning > > functions that set grub_errno on their exit paths. > > > > A Fedora 38 machine was observed to fail `multiboot2 /xen.gz` with > > "premature end of file". xen.gz was well formed and could be > > successfully gunzip-ed in Linux. > > > > The TPM is flaky and produces errors when the verifier tries to extend > > PCRs with measurements. Logs show "Unkown TPM error" and grub_errno is > > set to GRUB_ERR_UNKNOWN_DEVICE. This pre-existing grub_errno causes an > > otherwise successful grub_gzio_read_real() call to return error. > This bus is likely to create other problems as well. Why not fix it? > If this error is meant to be ignored rather than stop loading, then it > should be discarded early, possibly printed. If it should stop loading > then this should really stop and not even get here Jason, this makes me wonder what GRUB version you use. Do you have this commit afdef4a56 (tpm: Enable boot despite unknown firmware failure)? I am not sure I did not ask you about this earlier... Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] fs/xfs: add large extent counters incompat feature support
On Mon, Oct 30, 2023 at 07:48:43PM +0100, Daniel Kiper wrote: > Hey, > > Adding Marta and Sebastian... > > On Thu, Oct 26, 2023 at 05:55:54PM +0200, Andrey Albershteyn wrote: > > haha what a chance! > > > > Just today I was working on the same thing, and have almost identical patch > > which I was about to send :) > > > > The patch looks good to me. > > Reviewed-by: Andrey Albershteyn > > Reviewed-by: Daniel Kiper > > Marta, Sebastian, may I ask you to test this patch as well? Sebastian, did you have a chance to test this patch? Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH 3/4] types: Split aligned and packed guids
On Tue, Oct 31, 2023 at 08:35:26PM +0100, Vladimir 'phcoder' Serbinenko wrote: > From 48c239ad9efc40563015052383d80830d410c2c8 Mon Sep 17 00:00:00 2001 > From: Vladimir Serbinenko > Date: Sun, 13 Aug 2023 09:18:23 +0200 > Subject: [PATCH 3/4] types: Split aligned and packed guids > > On ia64 alignment requirements are strict. When we pass a pointer to > UUID it needs to be at least 4-byte aligned or EFI will crash. > On the other hand in device path there is no padding for UUID, so we > need 2 types in one formor another. Make 4-byte aligned and unaligned types > > Signed-off-by: Vladimir Serbinenko > --- > grub-core/commands/efi/lsefi.c| 2 +- > grub-core/efiemu/runtime/efiemu.c | 33 +-- > grub-core/kern/efi/efi.c | 2 +- > grub-core/kern/misc.c | 2 +- > grub-core/loader/i386/xnu.c | 2 +- > include/grub/efi/api.h| 12 +-- > include/grub/efiemu/efiemu.h | 4 ++-- > include/grub/efiemu/runtime.h | 2 +- > include/grub/types.h | 11 ++- > 9 files changed, 46 insertions(+), 24 deletions(-) > > diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c > index 95cba5baf..7b8316d41 100644 > --- a/grub-core/commands/efi/lsefi.c > +++ b/grub-core/commands/efi/lsefi.c > @@ -96,7 +96,7 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)), >grub_efi_handle_t handle = handles[i]; >grub_efi_status_t status; >grub_efi_uintn_t num_protocols; > - grub_guid_t **protocols; > + grub_packed_guid_t **protocols; >grub_efi_device_path_t *dp; > >grub_printf ("Handle %p\n", handle); > diff --git a/grub-core/efiemu/runtime/efiemu.c > b/grub-core/efiemu/runtime/efiemu.c > index c84b30652..f6b6d19f7 100644 > --- a/grub-core/efiemu/runtime/efiemu.c > +++ b/grub-core/efiemu/runtime/efiemu.c > @@ -66,7 +66,7 @@ efiemu_convert_pointer (grub_efi_uintn_t debug_disposition, > > grub_efi_status_t __grub_efi_api > efiemu_get_variable (grub_efi_char16_t *variable_name, > - const grub_guid_t *vendor_guid, > + const grub_packed_guid_t *vendor_guid, >grub_efi_uint32_t *attributes, >grub_efi_uintn_t *data_size, >void *data); > @@ -74,11 +74,11 @@ efiemu_get_variable (grub_efi_char16_t *variable_name, > grub_efi_status_t __grub_efi_api > efiemu_get_next_variable_name (grub_efi_uintn_t *variable_name_size, > grub_efi_char16_t *variable_name, > -grub_guid_t *vendor_guid); > +grub_packed_guid_t *vendor_guid); > > grub_efi_status_t __grub_efi_api > efiemu_set_variable (grub_efi_char16_t *variable_name, > - const grub_guid_t *vendor_guid, > + const grub_packed_guid_t *vendor_guid, >grub_efi_uint32_t attributes, >grub_efi_uintn_t data_size, >void *data); > @@ -416,7 +416,7 @@ EFI_FUNC (efiemu_convert_pointer) (grub_efi_uintn_t > debug_disposition, > > /* Find variable by name and GUID. */ > static struct efi_variable * > -find_variable (const grub_guid_t *vendor_guid, > +find_variable (const grub_packed_guid_t *vendor_guid, > grub_efi_char16_t *variable_name) > { >grub_uint8_t *ptr; > @@ -438,7 +438,7 @@ find_variable (const grub_guid_t *vendor_guid, > > grub_efi_status_t __grub_efi_api > EFI_FUNC (efiemu_get_variable) (grub_efi_char16_t *variable_name, > - const grub_guid_t *vendor_guid, > + const grub_packed_guid_t *vendor_guid, > grub_efi_uint32_t *attributes, > grub_efi_uintn_t *data_size, > void *data) > @@ -464,7 +464,7 @@ EFI_FUNC (efiemu_get_variable) (grub_efi_char16_t > *variable_name, > grub_efi_status_t __grub_efi_api EFI_FUNC > (efiemu_get_next_variable_name) (grub_efi_uintn_t *variable_name_size, >grub_efi_char16_t *variable_name, > - grub_guid_t *vendor_guid) > + grub_packed_guid_t *vendor_guid) > { >struct efi_variable *efivar; >LOG ('l'); > @@ -503,7 +503,7 @@ grub_efi_status_t __grub_efi_api EFI_FUNC > > grub_efi_status_t __grub_efi_api > EFI_FUNC (efiemu_set_variable) (grub_efi_char16_t *variable_name, > - const grub_guid_t *vendor_guid, > + const grub_packed_guid_t *vendor_guid, > grub_efi_uint32_t attributes, > grub_efi_uintn_t data_size, > void *data) > @@ -597,9 +597,22 @@ struct grub_efi_runtime_services efiemu_runtime_services > = >.set_virtual_address_map = efiemu_set_virtual_address_map, >.convert_pointer = efiemu_convert_pointer, > > -
Re: [PATCH] types: Fix typo
On Tue, Oct 31, 2023 at 08:22:04PM +0100, Vladimir 'phcoder' Serbinenko wrote: > From e597e474b4ac0423d42902708d536670dba44a1c Mon Sep 17 00:00:00 2001 > From: Vladimir Serbinenko > Date: Sun, 13 Aug 2023 09:19:02 +0200 > Subject: [PATCH] types: Fix typo > > Just a small grammar mistake. > > Signed-off-by: Vladimir Serbinenko Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] lsefi: Add missing static qualifier
On Tue, Oct 31, 2023 at 08:21:08PM +0100, Vladimir 'phcoder' Serbinenko wrote: > From 42b026a69bdb69025499ba761f40d7cb7e0a16d1 Mon Sep 17 00:00:00 2001 > From: Vladimir Serbinenko > Date: Sun, 13 Aug 2023 09:15:54 +0200 > Subject: [PATCH] lsefi: Add missing static qualifier > > known_protocols isn't used anywhere else and even misses grub_ prefix, so > let's make it local (static). > > Signed-off-by: Vladimir Serbinenko Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] acpi: Mark MADT entries as packed.
On Tue, Oct 31, 2023 at 08:20:14PM +0100, Vladimir 'phcoder' Serbinenko wrote: > From 9d03ab04df3b723058fb0b7c30576e1330cbad5d Mon Sep 17 00:00:00 2001 > From: Vladimir Serbinenko > Date: Tue, 31 Oct 2023 18:27:19 +0100 > Subject: [PATCH] acpi: Mark MADT entries as packed. > > No alignment is guaranteed and in fact on my ia64 sapic is aligned > to 4 bytes instead of 8 and causes a trap. It affects only rarely used > lsacpi command and so went unnoticed. At least you missed grub_acpi_madt_entry_header struct. It should have packed attribute too. Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] fs/xfs: add large extent counters incompat feature support
Tested-by: Philip Hands (first-time incompetence with git send-email lost this from previous mail) ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v4] fs/xfs: Fix XFS directory extent parsing
Tested-by: Philip Hands (first-time incompetence with git send-email lost this from previous mail) ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel