From owner-cvs-all@FreeBSD.ORG Tue Sep 2 17:52:29 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 6101E106568F; Tue, 2 Sep 2008 17:52:29 +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 5320E8FC0A; Tue, 2 Sep 2008 17:52:29 +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 m82HqT6w051448; Tue, 2 Sep 2008 17:52:29 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m82HqTFW051447; Tue, 2 Sep 2008 17:52:29 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200809021752.m82HqTFW051447@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Tue, 2 Sep 2008 17:52:11 +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 cpu_switch.S machdep.c src/sys/amd64/ia32 ia32_signal.c 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: Tue, 02 Sep 2008 17:52:29 -0000 kib 2008-09-02 17:52:11 UTC FreeBSD src repository Modified files: sys/amd64/amd64 cpu_switch.S machdep.c sys/amd64/ia32 ia32_signal.c Log: SVN rev 182684 on 2008-09-02 17:52:11Z by kib - When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386 processes, clear PCB_32BIT and PCB_GS32BIT bits [1]. - Reread the fs and gs bases from the msr unconditionally, not believing the values in pcb_fsbase and pcb_gsbase, since usermode may reload segment registers, invalidating the cache. [2]. Both problems resulted in the wrong fs base, causing wrong tls pointer be dereferenced in the usermode. Reported and tested by: Vyacheslav Bocharov [1] Reported by: Bernd Walter , Artem Belevich [2] Reviewed by: peter MFC after: 3 days Revision Changes Path 1.163 +18 -2 src/sys/amd64/amd64/cpu_switch.S 1.688 +1 -0 src/sys/amd64/amd64/machdep.c 1.19 +1 -0 src/sys/amd64/ia32/ia32_signal.c