summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-04-24 01:48:59 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-04-24 01:48:59 +0000
commit7dbf40d20d37617abb4126fde75722424d47ce50 (patch)
tree2148818b1d7e4c098e464487fa619b8010b7f6f5 /sys
parente17d2e5a6fa55215d82883890ef39b881717b5bd (diff)
downloadFreeBSD-src-7dbf40d20d37617abb4126fde75722424d47ce50.zip
FreeBSD-src-7dbf40d20d37617abb4126fde75722424d47ce50.tar.gz
Don't print anything for fault at cpu_switch_load_gs, just like other
code to recover fault in doreti because of invalid segment registers, silently push error to userland.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/trap.c9
-rw-r--r--sys/i386/i386/trap.c9
2 files changed, 6 insertions, 12 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index a0f8508..032702c 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -212,7 +212,8 @@ trap(frame)
printf(
"pid %ld (%s): trap %d with interrupts disabled\n",
(long)curproc->p_pid, curproc->p_comm, type);
- else if (type != T_BPTFLT && type != T_TRCTRAP) {
+ else if (type != T_BPTFLT && type != T_TRCTRAP &&
+ frame.tf_eip != (int)cpu_switch_load_gs) {
/*
* XXX not quite right, since this may be for a
* multiple fault in user mode.
@@ -224,8 +225,7 @@ trap(frame)
* and we shouldn't enable interrupts while holding a
* spin lock.
*/
- if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL &&
- frame.tf_eip != (int)cpu_switch_load_gs)
+ if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL)
enable_intr();
}
}
@@ -481,9 +481,6 @@ trap(frame)
*/
if (frame.tf_eip == (int)cpu_switch_load_gs) {
PCPU_GET(curpcb)->pcb_gs = 0;
- printf(
- "Process %d has bad %%gs, reset to zero\n",
- p->p_pid);
#if 0
PROC_LOCK(p);
psignal(p, SIGBUS);
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index a0f8508..032702c 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/trap.c
@@ -212,7 +212,8 @@ trap(frame)
printf(
"pid %ld (%s): trap %d with interrupts disabled\n",
(long)curproc->p_pid, curproc->p_comm, type);
- else if (type != T_BPTFLT && type != T_TRCTRAP) {
+ else if (type != T_BPTFLT && type != T_TRCTRAP &&
+ frame.tf_eip != (int)cpu_switch_load_gs) {
/*
* XXX not quite right, since this may be for a
* multiple fault in user mode.
@@ -224,8 +225,7 @@ trap(frame)
* and we shouldn't enable interrupts while holding a
* spin lock.
*/
- if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL &&
- frame.tf_eip != (int)cpu_switch_load_gs)
+ if (type != T_PAGEFLT && PCPU_GET(spinlocks) == NULL)
enable_intr();
}
}
@@ -481,9 +481,6 @@ trap(frame)
*/
if (frame.tf_eip == (int)cpu_switch_load_gs) {
PCPU_GET(curpcb)->pcb_gs = 0;
- printf(
- "Process %d has bad %%gs, reset to zero\n",
- p->p_pid);
#if 0
PROC_LOCK(p);
psignal(p, SIGBUS);
OpenPOWER on IntegriCloud