Date: Sun, 24 Sep 2000 14:06:53 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.ORG> To: Alfred Perlstein <bright@wintelcom.net> Cc: freebsd-smp@FreeBSD.ORG, Bruce Evans <bde@zeta.org.au>, The Hermit Hacker <scrappy@hub.org>, Warner Losh <imp@village.org>, Dag-Erling Smorgrav <des@ofug.org> Subject: Re: 'interrupt-level buffer overflows' for sio device? Message-ID: <200009242106.OAA53604@john.baldwin.cx> In-Reply-To: <20000924121359.O9141@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24-Sep-00 Alfred Perlstein wrote: > * Dag-Erling Smorgrav <des@ofug.org> [000924 11:39] wrote: >> Alfred Perlstein <bright@wintelcom.net> writes: >> > This is basically a result of the entire kernel running at the >> > equivelant of splhigh, all interrupts are blocked until a context >> > switch in kernel land. >> > >> > There's work in progress to mpsafe the drivers (at least for >> > ethernet, more will arrive later). >> >> OK. Assuming I wanted to try and help with this work, where would be a >> good place to start finding out what needs to be done? > > Have a look at what was recently done to the fxp driver, basically > protect the instance of the driver from itself, ie, if you see > splfoo() in the driver, identify what it's trying to protect against > and figure where the mutex needs to be. > > You want to block things like ioctls and user entry points from > interfering with the interrupt context of the driver. > > ATM John Baldwin is working on making some sort of flag for the > newbus interrupt and cdev initilization routines so that a driver > can mark itself mpsafe. Only for cdevsw. newbus interrupt handlers already have the flag, and have had it for a while. > Other things need to be taken care of though, fxp can't have Giant > (the equivelant of splhigh) removed until several things happen: > > ether_input/output is made mpsafe (trivial) > the ifqueue structs have mutexes put into them (trivial) > the mbuf subsystem made made mpsafe (done, but not committed) > malloc made mpsafe (done and committed) > softinterrupt scheduling is made mpsafe (I think this is on John's plate) Err, this should be mpsafe on the x86 already. It will be mpsafe on the alpha shortly. -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009242106.OAA53604>