mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
If CPU happens to be in usermode when a T_RESERVED trap occured,
then trapsignal is called with ksi.ksi_signo = 0. For debugging kernels, that should end up in panic, for non-debugging kernels behaviour is undefined. Do panic regardeless of execution mode at the moment of trap. Reviewed by: jhb MFC after: 1 month
This commit is contained in:
parent
65553dd979
commit
a1bfaca761
2 changed files with 10 additions and 0 deletions
|
|
@ -253,6 +253,11 @@ trap(struct trapframe *frame)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (type == T_RESERVED) {
|
||||
trap_fatal(frame, 0);
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef HWPMC_HOOKS
|
||||
/*
|
||||
* CPU PMCs interrupt using an NMI. If the PMC module is
|
||||
|
|
|
|||
|
|
@ -225,6 +225,11 @@ trap(struct trapframe *frame)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (type == T_RESERVED) {
|
||||
trap_fatal(frame, 0);
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef HWPMC_HOOKS
|
||||
/*
|
||||
* CPU PMCs interrupt using an NMI so we check for that first.
|
||||
|
|
|
|||
Loading…
Reference in a new issue