diff options
author | kib <kib@FreeBSD.org> | 2009-09-21 09:41:51 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-09-21 09:41:51 +0000 |
commit | 611929da1aaac05af3f5046bc8fa13599278ff7e (patch) | |
tree | 1d3041a278642d5a2f7414ac70ce0d5af4099f0f /sys/amd64 | |
parent | 3d92c94a1be4a40eb8b3a68066a6bf9d31cc38e8 (diff) | |
download | FreeBSD-src-611929da1aaac05af3f5046bc8fa13599278ff7e.zip FreeBSD-src-611929da1aaac05af3f5046bc8fa13599278ff7e.tar.gz |
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
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/trap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 65f761e..cfccf3c 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -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 |