aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-04-16 14:19:01 +0100
committerMichael Brown <mcb30@ipxe.org>2024-04-16 14:19:01 +0100
commitcb95b5b378b1a61d10770965d82dba535b6be242 (patch)
treeec6c8a0f37a8771e9100cd8b41ce9b0fd80a4a13
parent40b51124400df9cb0c57512ff93ac21827d5bac0 (diff)
downloadipxe-cb95b5b378b1a61d10770965d82dba535b6be242.zip
ipxe-cb95b5b378b1a61d10770965d82dba535b6be242.tar.gz
ipxe-cb95b5b378b1a61d10770965d82dba535b6be242.tar.bz2
[efi] Veto the Dhcp6Dxe driver on all platformsvetodhcp6
The reference implementation of Dhcp6Dxe in EDK2 has a fatal flaw: the code in EfiDhcp6Stop() will poll the network in a tight loop until either a response is received or a timer tick (at TPL_CALLBACK) occurs. When EfiDhcp6Stop() is called at TPL_CALLBACK or higher, this will result in an endless loop and an apparently frozen system. Since this is the reference implementation of Dhcp6Dxe, it is likely that almost all platforms have the same problem. Fix by vetoing the broken driver. If the upstream driver is ever fixed and a new version number issued, then we could plausibly test against the version number exposed via the driver binding protocol. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/interface/efi/efi_veto.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/interface/efi/efi_veto.c b/src/interface/efi/efi_veto.c
index a3b60d6..37aa9a3 100644
--- a/src/interface/efi/efi_veto.c
+++ b/src/interface/efi/efi_veto.c
@@ -494,6 +494,32 @@ efi_veto_vmware_uefipxebc ( EFI_DRIVER_BINDING_PROTOCOL *binding __unused,
return 1;
}
+/**
+ * Veto Dhcp6Dxe driver
+ *
+ * @v binding Driver binding protocol
+ * @v loaded Loaded image protocol
+ * @v wtf Component name protocol, if present
+ * @v manufacturer Manufacturer name, if present
+ * @v name Driver name, if present
+ * @ret vetoed Driver is to be vetoed
+ */
+static int efi_veto_dhcp6 ( EFI_DRIVER_BINDING_PROTOCOL *binding __unused,
+ EFI_LOADED_IMAGE_PROTOCOL *loaded __unused,
+ EFI_COMPONENT_NAME_PROTOCOL *wtf __unused,
+ const char *manufacturer __unused,
+ const CHAR16 *name ) {
+ static const CHAR16 dhcp6[] = L"DHCP6 Protocol Driver";
+
+ /* Check driver name */
+ if ( ! name )
+ return 0;
+ if ( memcmp ( name, dhcp6, sizeof ( dhcp6 ) ) != 0 )
+ return 0;
+
+ return 1;
+}
+
/** Driver vetoes */
static struct efi_veto_candidate efi_vetoes[] = {
{
@@ -508,6 +534,10 @@ static struct efi_veto_candidate efi_vetoes[] = {
.name = "VMware UefiPxeBc",
.veto = efi_veto_vmware_uefipxebc,
},
+ {
+ .name = "Dhcp6",
+ .veto = efi_veto_dhcp6,
+ },
};
/**