From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 14 08:47:52 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 4DE8916A4DE for ; Mon, 14 Aug 2006 08:47:52 +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 722DB43D76 for ; Mon, 14 Aug 2006 08:47:42 +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 1GCY6k-0006wk-LV for freebsd-hackers@freebsd.org; Mon, 14 Aug 2006 12:47:41 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with ESMTP id 7F36612C7B for ; Mon, 14 Aug 2006 12:46:59 +0600 (YEKST) Date: Mon, 14 Aug 2006 12:46:58 +0600 From: Stanislav Sedov To: freebsd-hackers@freebsd.org Message-ID: <20060814124658.1d416cbe@localhost> Organization: MBSD labs, Inc. X-Operating-System: FreeBSD X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_qWUgz/_QkiiVYFs+zVAkzMV"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.6.0 Subject: 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 08:47:52 -0000 --Sig_qWUgz/_QkiiVYFs+zVAkzMV Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Hi! I'm trying to write kernel code where exceptions are unavoidable. To clarify , I need to recover after GP (general protection) exception on i386 cpu and return an error in that case. Unfortunately, looking in trap.c kernel code I can't find any exception handling mechanism except inserting hooks into trap.c. So, the question is: how can one recover after exception in kernel code? AFAIK, linux build special exception table from various __ex_table sections to allow placing recover code into .fixup section. Does any such mechanism exists in freebsd? Thanks! --=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_qWUgz/_QkiiVYFs+zVAkzMV Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFE4BxiK/VZk+smlYERAqtQAKCBB1d6EBzBonTD4GTWJAJAny+dWwCfQO59 2ORTEWbOE8+8ilrTHjsTgIY= =M2BB -----END PGP SIGNATURE----- --Sig_qWUgz/_QkiiVYFs+zVAkzMV--