diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-07 05:19:58 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-07 05:19:58 +0000 |
commit | 9b11494e99aa86900d18c5cd63b5de104a347760 (patch) | |
tree | d412ef8dd7934035f86cf6d66174750fc8bb68b7 /sys/arch/hppa | |
parent | 24a72ccd3b31bd777fde62be30350f1c8adc3c10 (diff) |
do not treat traps from the syscall gate page as user code
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index 78c6dd9509d..57a75e8f2b2 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.67 2003/07/26 04:14:56 mickey Exp $ */ +/* $OpenBSD: trap.c,v 1.68 2003/08/07 05:19:57 mickey Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -463,7 +463,14 @@ if (kdb_trap (type, va, frame)) if (trapnum != T_INTERRUPT) splx(cpl); /* process softints */ - if (type & T_USER) + /* + * in case we were interrupted from the syscall gate page + * treat this as we were not realy running user code no more + * for weird things start to happen on return to the userland + * and also see a note in locore.S:TLABEL(all) + */ + if ((type & T_USER) && + (frame->tf_iioq_head & ~PAGE_MASK) != SYSCALLGATE) userret(p, frame->tf_iioq_head, 0); } |