summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
diff options
context:
space:
mode:
authorMichael Brown2020-06-30 17:32:59 +0200
committerMichael Brown2020-06-30 17:45:48 +0200
commit2ae5d4338661b65c63eb5cb1a96e5b803fe7d620 (patch)
tree593b55cde52be85571da92d21d667fdd3186f1d5 /src/drivers/net
parent[efi] Detect and disable seriously broken EFI_RNG_PROTOCOL implementations (diff)
downloadipxe-2ae5d4338661b65c63eb5cb1a96e5b803fe7d620.tar.gz
ipxe-2ae5d4338661b65c63eb5cb1a96e5b803fe7d620.tar.xz
ipxe-2ae5d4338661b65c63eb5cb1a96e5b803fe7d620.zip
[efi] Raise TPL during driver entry point
As per commit c89a446 ("[efi] Run at TPL_CALLBACK to protect against UEFI timers") we expect to run at TPL_CALLBACK almost all of the time. Various code paths rely on this assumption. Code paths that need to temporarily lower the TPL (e.g. for entropy gathering) will restore it to TPL_CALLBACK. The entropy gathering code will be run during DRBG initialisation, which happens during the call to startup(). In the case of iPXE compiled as an EFI application this code will run within the scope of efi_snp_claim() and so will execute at TPL_CALLBACK as expected. In the case of iPXE compiled as an EFI driver the code will incorrectly run at TPL_APPLICATION since there is nothing within the EFI driver entry point that raises (and restores) the TPL. The net effect is that a build that includes the entropy-gathering code (e.g. a build with HTTPS enabled) will return from the driver entry point at TPL_CALLBACK, which causes a system lockup. Fix by raising and restoring the TPL within the EFI driver entry point. Debugged-by: Ignat Korchagin <ignat@cloudflare.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net')
0 files changed, 0 insertions, 0 deletions