HomeFreeBSD

uefisign: fix SizeOfHeaders sanity check.

Description

uefisign: fix SizeOfHeaders sanity check.

This check was too aggressive: it is fine if SizeOfHeaders is exactly
equal to the size of the DOS stub + PE header + section table. Despite
being wrong this code typically worked for most EFI binaries because
SizeOfHeaders is rounded up to a multiple of FileAlignment, which is
often large (e.g., 512 bytes for the FreeBSD loader) so most binaries
made it through.

Reviewed by: imp@
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/445

Details

Provenance
Kenneth Camann <kjcamann@gmail.com>Authored on Jan 3 2021, 2:11 AM
impCommitted on Jun 3 2021, 9:22 PM
Parents
rG37f780d3e0a2: Disable x2APIC for SandyBridge laptops with Samsung BIOS
Branches
Unknown
Tags
Unknown

Event Timeline