efi_loader: efi_guid_t must be 64-bit aligned
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 16 Dec 2018 10:16:03 +0000 (11:16 +0100)
committerAlexander Graf <agraf@suse.de>
Wed, 13 Feb 2019 08:40:05 +0000 (09:40 +0100)
The UEFI Specification Version 2.7 Errata A defines:

"EFI_GUID
128-bit buffer containing a unique identifier value.
Unless otherwise specified, aligned on a 64-bit boundary."

Before this patch efi_guid_t was 8-bit aligned.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/efi.h

index b5e2c64f38b59a2c57dfe8f305e538f1ddacd54b..d98441ab19de1f16a34fe35df8c861ba980d0933 100644 (file)
@@ -49,7 +49,7 @@ struct efi_device_path;
 
 typedef struct {
        u8 b[16];
-} efi_guid_t;
+} efi_guid_t __attribute__((aligned(8)));
 
 #define EFI_BITS_PER_LONG      (sizeof(long) * 8)