From owner-freebsd-smp Sun Sep 24 12:14:17 2000 Delivered-To: freebsd-smp@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id B0BCE37B422 for ; Sun, 24 Sep 2000 12:14:10 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e8OJE0i00206; Sun, 24 Sep 2000 12:14:00 -0700 (PDT) Date: Sun, 24 Sep 2000 12:14:00 -0700 From: Alfred Perlstein To: Dag-Erling Smorgrav Cc: Warner Losh , The Hermit Hacker , Bruce Evans , freebsd-smp@FreeBSD.ORG Subject: Re: 'interrupt-level buffer overflows' for sio device? Message-ID: <20000924121359.O9141@fw.wintelcom.net> References: <200009080314.VAA50701@harmony.village.org> <20000924113008.N9141@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: ; from des@ofug.org on Sun, Sep 24, 2000 at 08:39:14PM +0200 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * Dag-Erling Smorgrav [000924 11:39] wrote: > Alfred Perlstein 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. 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) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message