kernel - Fix efivar panic
* The efirt driver uses direct-map mode, and creates an independent
pmap to hold it. The direct map typically uses userspace addresses,
so SMAP must be disabled across any EFI call.
* Add smap_open(), smap_close(), smap_smep_disable(), and
smap_smep_enable() calls for C.
NOTE: We also have to set pcb_onfault to non-NULL to bypass failsafe
checks done in trap().
* Hack the EFI address space code to disable SMAP and SMEP across
the EFI call. Unfortunately since we also have to disable SMEP,
these functions have to manipulate CR4.
Reported-by: daftaupe