From owner-p4-projects@FreeBSD.ORG Sun Dec 9 16:59:02 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A29D516A420; Sun, 9 Dec 2007 16:59:02 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5614716A418 for ; Sun, 9 Dec 2007 16:59:02 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4705113C467 for ; Sun, 9 Dec 2007 16:59:02 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lB9Gx2GT052998 for ; Sun, 9 Dec 2007 16:59:02 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lB9Gx2eZ052995 for perforce@freebsd.org; Sun, 9 Dec 2007 16:59:02 GMT (envelope-from gonzo@FreeBSD.org) Date: Sun, 9 Dec 2007 16:59:02 GMT Message-Id: <200712091659.lB9Gx2eZ052995@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 130550 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2007 16:59:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=130550 Change 130550 by gonzo@gonzo_jeeves on 2007/12/09 16:58:33 o Panic in case of bus error/address error exceptions from kernel land. More sophisticated check should be applied, like check if it's userland address in kernel mode or pure kernel exception. But on the moment this stub will do the trick and eliminate deadlock on unaligned access to KVA. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/trap.c#23 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/trap.c#23 (text+ko) ==== @@ -281,21 +281,17 @@ goto done; break; - case TrAdEL: - case TrDBE: - if (trap_error == -1/* && trap_addr == badvaddr*/) { - /* - * XXX Would like to check trap_addr==badvaddr, - * but it doesn't seem that CPUs set that in the DBE - * case :( - * - * XXX do an onfault thing like other ports? - */ - trap_error = EINVAL; - tf->tf_regs[TF_EPC] += 4; - goto done; - } - call_trapsignal(curthread, SIGSEGV, 0); + case TrAdEL + TrUser: + case TrAdES + TrUser: + case TrDBE + TrUser: + case TrIBE + TrUser: + /* + * XXX: On the moment just deliver SIGBUS to userland apps + * and panic if it's kernelland exception. Otherwise we'll + * get alignment issues silently ignored and deadlock as a + * result. + */ + call_trapsignal(curthread, SIGBUS, 0); goto done; break; default: