From owner-cvs-src@FreeBSD.ORG Tue Nov 11 01:25:25 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29F2B16A4CF; Tue, 11 Nov 2003 01:25:25 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16C2B43FF7; Tue, 11 Nov 2003 01:25:20 -0800 (PST) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAB9PJXJ021906; Tue, 11 Nov 2003 01:25:19 -0800 (PST) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAB9PJK5021905; Tue, 11 Nov 2003 01:25:19 -0800 (PST) (envelope-from marcel) Message-Id: <200311110925.hAB9PJK5021905@repoman.freebsd.org> From: Marcel Moolenaar Date: Tue, 11 Nov 2003 01:25:19 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/ia64/ia64 machdep.c syscall.S X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 09:25:25 -0000 marcel 2003/11/11 01:25:19 PST FreeBSD src repository Modified files: sys/ia64/ia64 machdep.c syscall.S Log: Fix a nasty bug that got exposed when the sendsig() and sigreturn() functions switched to using {g|s}et_mcontext(). The problem is that sigreturn(), being a syscall, can be given an async. context (i.e. one corresponding to an interrupt or trap). When this happens, we try to return to user mode via epc_syscall_return with a trapframe that can only be used to return to user mode via exception_restore. To fix this, we check the frame's flags immediately prior to epc_syscall_return and branch to exception_restore for non-syscall frames. Modify the assertion in set_mcontext() to check that if there's a mismatch, it's because of sigreturn(). Revision Changes Path 1.167 +10 -1 src/sys/ia64/ia64/machdep.c 1.11 +16 -3 src/sys/ia64/ia64/syscall.S