]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r343298:
authorgonzo <gonzo@FreeBSD.org>
Thu, 25 Apr 2019 00:58:11 +0000 (00:58 +0000)
committergonzo <gonzo@FreeBSD.org>
Thu, 25 Apr 2019 00:58:11 +0000 (00:58 +0000)
commit5e278749b815638eb0cfc0e1b9bd3cfa8ee96b6a
tree069ad23c2763f2c16badcbe59dae223d15806be9
parentdce257b4fb97769b321adab353fa56d4680a9d45
MFC r343298:

[ndis] Fix unregistered use of FPU by NDIS in kernel on amd64

amd64 miniport drivers are allowed to use FPU which triggers "Unregistered use
of FPU in kernel" panic.

Wrap all variants of MSCALL with fpu_kern_enter/fpu_kern_leave.  To reduce
amount of allocations/deallocations done via
fpu_kern_alloc_ctx/fpu_kern_free_ctx maintain cache of fpu_kern_ctx elements.

Based on the patch by Paul B Mahol

PR: 165622
Submitted by: Vlad Movchan <vladislav.movchan@gmail.com>
sys/compat/ndis/kern_windrv.c
sys/compat/ndis/pe_var.h