summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-05-04 10:12:50 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-05-07 21:10:03 +0200
commit1884512b77ce54fffa50bb07cf065d4831171a6d (patch)
tree13bc408e2466577fc951d03674cec75a54b00473
parent52cbac9b06bf247dda8ff261b15e3c13f88188db (diff)
efi_loader: allowable event types in CreateEventEx()
CreateEventEx() does not allow the following event types: * EVT_SIGNAL_EXIT_BOOT_SERVICES * EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE This check is needed to pass the UEFI SCT conformance test. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Alexander Graf <agraf@csgraf.de>
-rw-r--r--lib/efi_loader/efi_boottime.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index e5c46e9f08..3ed08e7c37 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -664,10 +664,26 @@ efi_status_t EFIAPI efi_create_event_ex(uint32_t type, efi_uintn_t notify_tpl,
efi_guid_t *event_group,
struct efi_event **event)
{
+ efi_status_t ret;
+
EFI_ENTRY("%d, 0x%zx, %p, %p, %pUl", type, notify_tpl, notify_function,
notify_context, event_group);
- return EFI_EXIT(efi_create_event(type, notify_tpl, notify_function,
- notify_context, event_group, event));
+
+ /*
+ * The allowable input parameters are the same as in CreateEvent()
+ * except for the following two disallowed event types.
+ */
+ switch (type) {
+ case EVT_SIGNAL_EXIT_BOOT_SERVICES:
+ case EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE:
+ ret = EFI_INVALID_PARAMETER;
+ goto out;
+ }
+
+ ret = efi_create_event(type, notify_tpl, notify_function,
+ notify_context, event_group, event);
+out:
+ return EFI_EXIT(ret);
}
/**