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

Unified Diff: vboot_firmware/include/rollback_index.h

Issue 2786005: Protect the kernel version space from redefinition. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: several small fixes 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 | « no previous file | vboot_firmware/include/tlcl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vboot_firmware/include/rollback_index.h
diff --git a/vboot_firmware/include/rollback_index.h b/vboot_firmware/include/rollback_index.h
index 9be97b9737f04a5152dee8aa3ca249471b1ce698..c5c650e6bb5e9e46d743409497a64feb1c26ec75 100644
--- a/vboot_firmware/include/rollback_index.h
+++ b/vboot_firmware/include/rollback_index.h
@@ -25,7 +25,13 @@ extern uint16_t g_kernel_version;
#define KERNEL_VERSIONS_NV_INDEX 0x1002
#define TPM_IS_INITIALIZED_NV_INDEX 0x1003
#define KERNEL_VERSIONS_BACKUP_NV_INDEX 0x1004
-#define KERNEL_BACKUP_IS_VALID_NV_INDEX 0x1005
+#define KERNEL_MUST_USE_BACKUP_NV_INDEX 0x1005
+
+/* Unique ID to detect kernel space redefinition */
+#define KERNEL_SPACE_UID "GRWL" /* unique ID with secret meaning */
+#define KERNEL_SPACE_UID_SIZE (sizeof(KERNEL_SPACE_UID) - 1)
+#define KERNEL_SPACE_INIT_DATA ((uint8_t*) "\0\0\0\0" KERNEL_SPACE_UID)
+#define KERNEL_SPACE_SIZE (sizeof(uint32_t) + KERNEL_SPACE_UID_SIZE)
/* All functions return 0 if successful, non-zero if error */
uint32_t SetupTPM(void);
« no previous file with comments | « no previous file | vboot_firmware/include/tlcl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698