HomeFreeBSD

Prevent loading SGX with incorrect EPC data

Description

Prevent loading SGX with incorrect EPC data

It may happen on some machines, that even if SGX is disabled
in firmware, the driver would still attach despite EPC base and
size equal zero. Such behaviour causes a kernel panic when the
module is unloaded. Add a simple check to make sure we
only attach when these values are correctly set.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: br
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D19595

Details

Committed
mwMar 19 2019, 2:33 AM
Reviewer
br
Differential Revision
D19595: sgx: Don't attach if EPC data is corrupted.
Parents
rS345287: MFC r344797:
Branches
Unknown
Tags
Unknown