From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Date: Fri, 11 Apr 2003 18:12:05 +0000 Subject: Re: [ANNOUNCE] udev 0.1 release Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org > > - There's a race with replugging, which you can do little about > > True, but this can get smaller. There isn't such a thing as a small race. Either there is a race or there is no race. 'Should usually work' is not enough, especially when security is concerned. > > - Error handling. What do you do if the invocation ends in EIO ? > > Which invocation? From /sbin/hotplug? Yes. This is a serious problem. Your scheme has very nasty failure modes. By implementing this in user space you are introducing additional failure modes. - You need disk access -> EIO - You have no control over memory allocation -> ENOMEM, EIO in swap space Usually I'd not care about EIO, but here security is threatened. EIO crashing the system under some circumstances is inevitable, EIO opening a security hole is not acceptable however. > > - Performance. What happens if you plug in 4000 disks at once? > > You crash your power supply :) > > Seriously, the kernel spawns 4000 instances of /sbin/hotplug just like > it always does. I'm working on keeping udev from spawning anything else > to keep the process cound down (right now it fork/execs for mknod, but > that was just me being lazy.) 4000 spawnings is 32MB for kernel stacks alone. You cannot assume that resources will be sufficient for that. That again is a serious problem, because you cannot resync. If you lose a 'remove' event you're screwed. And of course, what do you do if the driver is not yet loaded? Regards Oliver ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel