代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 15 Jun 2018 09:25:00 +0200
Subject: [PATCH] TPM: Fix hash_log_extend_event function prototype
The DataToHash argument is a efi_physical_address, not a *pointer* to
a efi_physical_address.
This distinction is important for 32 bits builds, where the pointer is
only 32 bits where as an efi_physical_address is 64 bits.
Fixing this fixes the tpm code not working with 32 bits build and grub
showing multiple:
error: Invalid parameter
Messages during boot, followed by a "press any key to continue" message.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
grub-core/kern/efi/tpm.c | 2 +-
include/grub/efi/tpm.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/efi/tpm.c b/grub-core/kern/efi/tpm.c
index c9fb3c133..36e1f69df 100644
--- a/grub-core/kern/efi/tpm.c
+++ b/grub-core/kern/efi/tpm.c
@@ -245,7 +245,7 @@ grub_tpm2_log_event(grub_efi_handle_t tpm_handle, unsigned char *buf,
event->Size = sizeof(*event) - sizeof(event->Event) + grub_strlen(description) + 1;
grub_memcpy(event->Event, description, grub_strlen(description) + 1);
- status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
+ status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, (unsigned long) buf,
(grub_uint64_t) size, event);
switch (status) {
diff --git a/include/grub/efi/tpm.h b/include/grub/efi/tpm.h
index e2aff4a3c..63d8a0fe7 100644
--- a/include/grub/efi/tpm.h
+++ b/include/grub/efi/tpm.h
@@ -129,7 +129,7 @@ struct grub_efi_tpm2_protocol
grub_efi_boolean_t *EventLogTruncated);
grub_efi_status_t (*hash_log_extend_event) (struct grub_efi_tpm2_protocol *this,
grub_efi_uint64_t Flags,
- grub_efi_physical_address_t *DataToHash,
+ grub_efi_physical_address_t DataToHash,
grub_efi_uint64_t DataToHashLen,
EFI_TCG2_EVENT *EfiTcgEvent);
grub_efi_status_t (*submit_command) (struct grub_efi_tpm2_protocol *this,
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。