* [U-Boot] [PATCH 1/1] efi_loader: allowable event types in CreateEventEx()
@ 2019-05-04 8:17 Heinrich Schuchardt
2019-05-05 7:15 ` Alexander Graf
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2019-05-04 8:17 UTC (permalink / raw)
To: u-boot
CreateEventEx() does allow the following event types:
* EVT_SIGNAL_EXIT_BOOT_SERVICES
* EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
lib/efi_loader/efi_boottime.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 602b0da9f0..8965dabb2b 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -665,10 +665,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);
}
/**
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 1/1] efi_loader: allowable event types in CreateEventEx()
2019-05-04 8:17 [U-Boot] [PATCH 1/1] efi_loader: allowable event types in CreateEventEx() Heinrich Schuchardt
@ 2019-05-05 7:15 ` Alexander Graf
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2019-05-05 7:15 UTC (permalink / raw)
To: u-boot
On 04.05.19 10:17, Heinrich Schuchardt wrote:
> CreateEventEx() does allow the following event types:
... not ...
>
> * EVT_SIGNAL_EXIT_BOOT_SERVICES
> * EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Did you find this proactively or is it fixing some SCT test case? After
all, functionally the change should be a no-op, because no payload
should create those events in the first place :). I would just like to
see some comment about the reasoning in the commit message.
Either way, this is definitely getting us closer to spec conformance, so
good to have. Maybe one day (if we grow too much), we can have some
smarts somewhere that allow us to skip all those sanity checks in small
builds.
Reviewed-by: Alexander Graf <agraf@csgraf.de>
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-05 7:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-04 8:17 [U-Boot] [PATCH 1/1] efi_loader: allowable event types in CreateEventEx() Heinrich Schuchardt
2019-05-05 7:15 ` Alexander Graf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.