From owner-cvs-all@FreeBSD.ORG Mon Aug 18 08:47:44 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D372D1065689; Mon, 18 Aug 2008 08:47:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 952788FC29; Mon, 18 Aug 2008 08:47:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7I8liJE096867; Mon, 18 Aug 2008 08:47:44 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7I8lipW096866; Mon, 18 Aug 2008 08:47:44 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200808180847.m7I8lipW096866@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Mon, 18 Aug 2008 08:47:27 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/amd64/amd64 exception.S X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 08:47:44 -0000 kib 2008-08-18 08:47:27 UTC FreeBSD src repository Modified files: sys/amd64/amd64 exception.S Log: SVN rev 181823 on 2008-08-18 08:47:27Z by kib The doreti_iret_fault code is always called with gs base MSR containing kernel gs base, because %rip is adjusted only on kernel-mode trap caused by iretq execution. On the other hand, the stack contains (hardware part of) trap frame from the usermode. As a consequence, checking for frame mode and doing swapgs causes the kernel to enter trap() with usermode gs base. Remove the check for mode and conditional swapgs, we already have right gs base in the MSR. Submitted by: Nate Eldredge MFC after: 3 days Revision Changes Path 1.133 +3 -6 src/sys/amd64/amd64/exception.S