Date: Wed, 02 Dec 1998 00:44:39 -0800 From: Mike Smith <mike@smith.net.au> To: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au> Cc: current@FreeBSD.ORG Subject: Re: sio breakage Message-ID: <199812020844.AAA05482@dingo.cdrom.com> In-Reply-To: Your message of "Wed, 02 Dec 1998 18:48:28 %2B1100." <98Dec2.184751est.40352@border.alcanet.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> Bruce Evans <bde@zeta.org.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812020844.AAA05482>