From owner-cvs-src-old@FreeBSD.ORG Wed May 12 10:29:46 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9022910657C4 for ; Wed, 12 May 2010 10:29:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 7FF068FC08 for ; Wed, 12 May 2010 10:29:46 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o4CATkkR084611 for ; Wed, 12 May 2010 10:29:46 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o4CATkac084610 for cvs-src-old@freebsd.org; Wed, 12 May 2010 10:29:46 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <201005121029.o4CATkac084610@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Wed, 12 May 2010 10:29:35 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 apic_vector.S exception.S X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 10:29:46 -0000 kib 2010-05-12 10:29:35 UTC FreeBSD src repository Modified files: sys/amd64/amd64 apic_vector.S exception.S Log: SVN rev 207958 on 2010-05-12 10:29:35Z by kib Route all returns from the interrupts and faults through the doreti_iret labeled iretq instruction. Suppose that multithreaded process executes two threads, currently scheduled on different processors. Let assume that thread A executes using %cs or %ss pointing into the descriptor from LDT. If IPI comes which handler does not return by jump to doreti, and meantime thread B invalidates descriptor pointed to by %cs or %ss, then iretq from IPI handler could fault. Routing the return by doreti_iret allows kernel to catch the situation and recover from it by sending signal to the usermode. Tested by: pho MFC after: 1 week Revision Changes Path 1.114 +7 -6 src/sys/amd64/amd64/apic_vector.S 1.146 +1 -1 src/sys/amd64/amd64/exception.S