From owner-freebsd-current Wed Dec 2 00:46:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA25765 for freebsd-current-outgoing; Wed, 2 Dec 1998 00:46:33 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (ppp9.portal.net.au [202.12.71.109]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA25757 for ; Wed, 2 Dec 1998 00:46:29 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id AAA05482; Wed, 2 Dec 1998 00:44:40 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199812020844.AAA05482@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Peter Jeremy cc: current@FreeBSD.ORG Subject: Re: sio breakage In-reply-to: Your message of "Wed, 02 Dec 1998 18:48:28 +1100." <98Dec2.184751est.40352@border.alcanet.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 02 Dec 1998 00:44:39 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Bruce Evans wrote: > > >something_more_likely() > >{ > > asm("cli"); > > var = 0; > > asm("sti"); > >} > > >Fixes: > >kernel: send a fatal signal to applications that do this. > > I'd suggest sending SIGBUS, with the interrupts enabled. This would > allow the application to recover if necessary. That's the normal practice; I suspect that the problem is that the i386 doesn't trap attempts to clear PSL_I if PSL_IOPL is set, so you can't guarantee that this will be detected cleanly. (I may be wrong on this; I'd have to check the code more carefully.) > >applications: don't do this. > > I don't believe this is reasonable. We should provide some safe way > for an application program to execute code with interrupts disabled. > Amongst other applications, XFree86 needs this. It shouldn't (ideally). If it does, this is clearly indicative of a need to move some of the server code into the kernel, or in some other architecturally clean fashion provide the currently missing assurances pertaining to running with interrupts disabled. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message