Unconditionally perform checks that FPU region was entered, when #NM
exception is caught in kernel mode. There are third-party modules which trigger the issue, and since the problem causes usermode state corruption at least, panic in production kernels as well. Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
2d700cb557
commit
e42f8233fc
@ -443,8 +443,8 @@ trap(struct trapframe *frame)
|
||||
goto out;
|
||||
|
||||
case T_DNA:
|
||||
KASSERT(!PCB_USER_FPU(td->td_pcb),
|
||||
("Unregistered use of FPU in kernel"));
|
||||
if (PCB_USER_FPU(td->td_pcb))
|
||||
panic("Unregistered use of FPU in kernel");
|
||||
fpudna();
|
||||
goto out;
|
||||
|
||||
|
@ -540,8 +540,8 @@ trap(struct trapframe *frame)
|
||||
|
||||
case T_DNA:
|
||||
#ifdef DEV_NPX
|
||||
KASSERT(!PCB_USER_FPU(td->td_pcb),
|
||||
("Unregistered use of FPU in kernel"));
|
||||
if (PCB_USER_FPU(td->td_pcb))
|
||||
panic("Unregistered use of FPU in kernel");
|
||||
if (npxdna())
|
||||
goto out;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user