From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 14 15:48:13 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A05116A4DA; Mon, 14 Aug 2006 15:48:13 +0000 (UTC) (envelope-from ssedov@mbsd.msk.ru) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94B1243D45; Mon, 14 Aug 2006 15:48:12 +0000 (GMT) (envelope-from ssedov@mbsd.msk.ru) Received: from [217.118.83.1] (helo=fonon.realnet) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1GCefh-0003MZ-2K; Mon, 14 Aug 2006 19:48:11 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with ESMTP id 3EA5812D6B; Mon, 14 Aug 2006 19:47:30 +0600 (YEKST) Date: Mon, 14 Aug 2006 19:47:29 +0600 From: Stanislav Sedov To: John Baldwin Message-ID: <20060814194729.436fc453@localhost> In-Reply-To: <200608140932.57875.jhb@freebsd.org> References: <20060814124658.1d416cbe@localhost> <200608140932.57875.jhb@freebsd.org> Organization: MBSD labs, Inc. X-Operating-System: FreeBSD X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_b.L.Jt9PH9ACZ_7KA7TBXjx; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.6.0 Cc: freebsd-hackers@freebsd.org Subject: Re: exception handling in kernel code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Aug 2006 15:48:13 -0000 --Sig_b.L.Jt9PH9ACZ_7KA7TBXjx Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Mon, 14 Aug 2006 09:32:57 -0400 John Baldwin mentioned: >=20 > You can make use of pcb_onfault to recover from a page fault, but that's > about it. Kernel code is expected to not generate exceptions. :) >=20 Thanks a lot! I'll try it. To clarify: I've implemented driver to allow user-level code to read MSRs (Model specific registers) (like linux's /dev/cpu/msr). It's required for some programs like x86info. As long as not all MSRs documented and reading/writing unexistent MSR leads to GP fault, I need to recover in that case. --=20 Stanislav Sedov MBSD labs, Inc. =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1 http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 --Sig_b.L.Jt9PH9ACZ_7KA7TBXjx Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFE4H7yK/VZk+smlYERAuGmAJ9uqkIjcl1Ez/wxO7KjY6KZyxzN4gCeNgbI B/Ef4ghJlt4dcm014Z76gXE= =ztsz -----END PGP SIGNATURE----- --Sig_b.L.Jt9PH9ACZ_7KA7TBXjx--