[ale] kernel funness?

Chris Ricker kaboom at gatech.edu
Wed Sep 3 08:08:00 EDT 2003


On Wed, 3 Sep 2003, Christopher Fowler wrote:

> On Tue, Sep 02, 2003 at 09:42:42PM -0600, Chris Ricker wrote:
> > It's there for performance. khttpd / TUX can avoid the copy to userspace and 
> > back by virtue of being in the kernel. It's more-or-less why NFS is in the 
> > kernel as well.
> 
> 
> I have not used it.  How is the cgi stuff?  Can khttpd serve up cgi or
> only static pages?  If it does serve up cgi's is it possible to oops the
> kernel with references to null pointers in the cgi code?

AFAIK, khttpd can only do static. Anything dynamic (including CGI) it does
by redirecting to another server. As such, what's getting crashed by crap
CGIs is the other (user-space) server.

TUX (which is what I've worked more with, though not using this particular
feature in production) can do that, but it also has a CGI-like interface
where pseudo-CGIs can be written as shared objects and loaded. These can be
running in user space or in kernel space. Usually, they're done in user
space. If in kernel space, they don't have all the normal memory protection,
which is one reason they're usually done in user space (the other being that
the kernel API for these is pretty limited -- more so than for the user
space pseudo-CGIs). If in user space, the kernel still can still cache their
output and do the usual zero copy goodness as long as it's cached....

later,
chris
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list