Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1477)

Unified Diff: vboot_firmware/lib/include/vboot_struct.h

Issue 2829004: More code cleanup (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: rebase Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vboot_firmware/lib/cgptlib/cgptlib_internal.c ('k') | vboot_firmware/stub/load_firmware_stub.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vboot_firmware/lib/include/vboot_struct.h
diff --git a/vboot_firmware/lib/include/vboot_struct.h b/vboot_firmware/lib/include/vboot_struct.h
index c77fa4bc747802965521d087fa12861ce4fa4f7f..98366fb25e7d3c14f1a96f44c929817538e57024 100644
--- a/vboot_firmware/lib/include/vboot_struct.h
+++ b/vboot_firmware/lib/include/vboot_struct.h
@@ -19,7 +19,7 @@ typedef struct VbPublicKey {
* in bits) */
uint64_t algorithm; /* Signature algorithm used by the key */
uint64_t key_version; /* Key version */
-} VbPublicKey;
+} __attribute__((packed)) VbPublicKey;
/* Signature data (a secure hash, possibly signed) */
@@ -28,7 +28,7 @@ typedef struct VbSignature {
* struct */
uint64_t sig_size; /* Size of signature data in bytes */
uint64_t data_size; /* Size of the data block which was signed in bytes */
-} VbSignature;
+} __attribute__((packed)) VbSignature;
#define KEY_BLOCK_MAGIC "CHROMEOS"
@@ -61,7 +61,7 @@ typedef struct VbKeyBlockHeader {
* For use with unsigned data keys */
uint64_t key_block_flags; /* Flags for key (KEY_BLOCK_FLAG_*) */
VbPublicKey data_key; /* Key to verify the chunk of data */
-} VbKeyBlockHeader;
+} __attribute__((packed)) VbKeyBlockHeader;
/* This should be followed by:
* 1) The data_key key data, pointed to by data_key.key_offset.
* 2) The checksum data for (VBKeyBlockHeader + data_key data), pointed to
@@ -86,7 +86,7 @@ typedef struct VbFirmwarePreambleHeader {
uint64_t firmware_version; /* Firmware version */
VbPublicKey kernel_subkey; /* Key to verify kernel key block */
VbSignature body_signature; /* Signature for the firmware body */
-} VbFirmwarePreambleHeader;
+} __attribute__((packed)) VbFirmwarePreambleHeader;
/* This should be followed by:
* 1) The kernel_subkey key data, pointed to by kernel_subkey.key_offset.
* 2) The signature data for the firmware body, pointed to by
@@ -114,7 +114,7 @@ typedef struct VbKernelPreambleHeader {
* loaded at body_load_address */
uint64_t bootloader_size; /* Size of bootloader in bytes */
VbSignature body_signature; /* Signature for the kernel body */
-} VbKernelPreambleHeader;
+} __attribute__((packed)) VbKernelPreambleHeader;
/* This should be followed by:
* 2) The signature data for the kernel body, pointed to by
* body_signature.sig_offset.
« no previous file with comments | « vboot_firmware/lib/cgptlib/cgptlib_internal.c ('k') | vboot_firmware/stub/load_firmware_stub.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698