* [patch] arm64: set correct length of device path end entry
@ 2014-01-07 17:06 Leif Lindholm
2014-01-07 17:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-07 17:11 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 2 replies; 3+ messages in thread
From: Leif Lindholm @ 2014-01-07 17:06 UTC (permalink / raw)
To: grub-devel
The length of the Device Path End entry in the grub_linux_boot()
funtcion is incorrectly set to 0. This triggers an assert failure
in debug builds of Tianocore.
The correct length is 4 bytes (1 byte type, 1 byte subtype,
2 bytes length).
Reported-by: Mark Salter <msalter@redhat.com>
diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
index 9d15aad..7c9bc2b 100644
--- a/grub-core/loader/arm64/linux.c
+++ b/grub-core/loader/arm64/linux.c
@@ -268,7 +268,7 @@ grub_linux_boot (void)
mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE;
mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
- mempath[1].header.length = 0;
+ mempath[1].header.length = 4;
b = grub_efi_system_table->boot_services;
status = b->load_image (0, grub_efi_image_handle,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] arm64: set correct length of device path end entry
2014-01-07 17:06 [patch] arm64: set correct length of device path end entry Leif Lindholm
@ 2014-01-07 17:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-07 17:11 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-07 17:07 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
Go ahead.
On 07.01.2014 18:06, Leif Lindholm wrote:
> The length of the Device Path End entry in the grub_linux_boot()
> funtcion is incorrectly set to 0. This triggers an assert failure
> in debug builds of Tianocore.
>
> The correct length is 4 bytes (1 byte type, 1 byte subtype,
> 2 bytes length).
>
> Reported-by: Mark Salter <msalter@redhat.com>
>
> diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
> index 9d15aad..7c9bc2b 100644
> --- a/grub-core/loader/arm64/linux.c
> +++ b/grub-core/loader/arm64/linux.c
> @@ -268,7 +268,7 @@ grub_linux_boot (void)
>
> mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE;
> mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
> - mempath[1].header.length = 0;
> + mempath[1].header.length = 4;
>
> b = grub_efi_system_table->boot_services;
> status = b->load_image (0, grub_efi_image_handle,
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] arm64: set correct length of device path end entry
2014-01-07 17:06 [patch] arm64: set correct length of device path end entry Leif Lindholm
2014-01-07 17:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2014-01-07 17:11 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2014-01-07 17:11 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]
On 07.01.2014 18:06, Leif Lindholm wrote:
> The length of the Device Path End entry in the grub_linux_boot()
> funtcion is incorrectly set to 0. This triggers an assert failure
> in debug builds of Tianocore.
>
> The correct length is 4 bytes (1 byte type, 1 byte subtype,
> 2 bytes length).
>
> Reported-by: Mark Salter <msalter@redhat.com>
>
> diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c
> index 9d15aad..7c9bc2b 100644
> --- a/grub-core/loader/arm64/linux.c
> +++ b/grub-core/loader/arm64/linux.c
> @@ -268,7 +268,7 @@ grub_linux_boot (void)
>
> mempath[1].header.type = GRUB_EFI_END_DEVICE_PATH_TYPE;
> mempath[1].header.subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
> - mempath[1].header.length = 0;
> + mempath[1].header.length = 4;
>
Could you use sizeof ?
> b = grub_efi_system_table->boot_services;
> status = b->load_image (0, grub_efi_image_handle,
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 274 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-07 17:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 17:06 [patch] arm64: set correct length of device path end entry Leif Lindholm
2014-01-07 17:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-01-07 17:11 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).