From owner-freebsd-net@FreeBSD.ORG Thu Sep 24 10:30:10 2009 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85E91106566B for ; Thu, 24 Sep 2009 10:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 722C58FC16 for ; Thu, 24 Sep 2009 10:30:10 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8OAUA2Q072400 for ; Thu, 24 Sep 2009 10:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8OAUAg4072397; Thu, 24 Sep 2009 10:30:10 GMT (envelope-from gnats) Date: Thu, 24 Sep 2009 10:30:10 GMT Message-Id: <200909241030.n8OAUAg4072397@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Jacob Myers Cc: Subject: Re: kern/138999: [libc] lighttpd/php-cgi with freebsd sendfile(2) enabled causing kernel to not reenter userland X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jacob Myers List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2009 10:30:10 -0000 The following reply was made to PR kern/138999; it has been noted by GNATS. From: Jacob Myers To: bug-followup@FreeBSD.org, jacob@whotookspaz.org Cc: Subject: Re: kern/138999: [libc] lighttpd/php-cgi with freebsd sendfile(2) enabled causing kernel to not reenter userland Date: Thu, 24 Sep 2009 05:51:38 -0400 This is a multi-part message in MIME format. --------------040709090100010605060305 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Er, whoops. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQIcBAEBAgAGBQJKu0EoAAoJEA933foYakKkoi0P/0eZ3z9frqhqacfcgwJEtXro 6e+cVyqdUp4LsQuh4198jrhuA6IXxAHVUB6JP5wkThA7ml0h5Jwd4w/LV2fPlFvC F8rYxyLZvrHenUWJoJELyZLt5B4P6QgwLD6+l1nyW6vE4IZZmnfqX9nqbE101xq8 tBcx1THXWAGgd+nrswDfKv5Y7QPzMjdCGA5vfnCQ9TQREoqgvCz0kuWKfHE3SpFc Pg2d/fyUwHNXOqJbU2N+HLqht+MT5wL/SAitDd5h4sUUtzi9cQ3h1niHwed+ctTP evsek0wdmfaVcdURNtLGYDos7OAszdVF2yKZO+I2IYiOhDZnGtVrLxM1BPYIcT7R xnUzIw5/A/u3raNpfkmHKbZkqOLZhu4IqFWmdLUjzKo/LvNoEMsIwIU7Zdcxro7s gYo5hGw9y2TNBQVOuZLC1/UN6vvAM7/MwL/AdVmP1wbyShg3t6n3pez/o95fy/Iq 4uTqYqQFgbFAZtURXnVm/0x5TjZJKvlSUcE7ckzRhzNOifaO4mEyEIHIPd0EIkdd qqzQ2OGnAUFXkRqCj15CIDx/qLo5O0jhmy9cCBX/BO4AVwvBXEdPMLl2x9IBTizr N5QIvEPUY3X9LNZgE5jcbt1hnSq1fmurkfX/ECJ1i4NAv4NhWLGEmeEwrWRtUIin DzvqkA+brIyLdZKGTmq0 =X+6G -----END PGP SIGNATURE----- --------------040709090100010605060305 Content-Type: text/plain; name="sendfile.sh" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sendfile.sh" # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # sendfile/lighttpd.conf # sendfile/upload.php # sendfile/uploader.php # echo x - sendfile/lighttpd.conf sed 's/^X//' >sendfile/lighttpd.conf << '13d6c5353933d78bbe99686dc1205d95' Xserver.modules = ( "mod_access", X "mod_fastcgi") X Xserver.document-root = "/usr/local/www/default/" Xserver.errorlog = "/var/log/lighttpd/default/error.log" X Xindex-file.names = ( "index.php", "index.html", X "index.htm", "default.htm" ) X Xserver.event-handler = "freebsd-kqueue" Xserver.network-backend = "freebsd-sendfile" X Xmimetype.assign = ( X ".pdf" => "application/pdf", X ".sig" => "application/pgp-signature", X ".spl" => "application/futuresplash", X ".class" => "application/octet-stream", X ".ps" => "application/postscript", X ".torrent" => "application/x-bittorrent", X ".dvi" => "application/x-dvi", X ".gz" => "application/x-gzip", X ".pac" => "application/x-ns-proxy-autoconfig", X ".swf" => "application/x-shockwave-flash", X ".tar.gz" => "application/x-tgz", X ".tgz" => "application/x-tgz", X ".tar" => "application/x-tar", X ".zip" => "application/zip", X ".mp3" => "audio/mpeg", X ".m3u" => "audio/x-mpegurl", X ".wma" => "audio/x-ms-wma", X ".wax" => "audio/x-ms-wax", X ".ogg" => "application/ogg", X ".wav" => "audio/x-wav", X ".gif" => "image/gif", X ".jar" => "application/x-java-archive", X ".jpg" => "image/jpeg", X ".jpeg" => "image/jpeg", X ".png" => "image/png", X ".xbm" => "image/x-xbitmap", X ".xpm" => "image/x-xpixmap", X ".xwd" => "image/x-xwindowdump", X ".css" => "text/css", X ".html" => "text/html", X ".htm" => "text/html", X ".js" => "text/javascript", X ".asc" => "text/plain", X ".c" => "text/plain", X ".cpp" => "text/plain", X ".log" => "text/plain", X ".conf" => "text/plain", X ".text" => "text/plain", X ".txt" => "text/plain", X ".diff" => "text/plain", X ".patch" => "text/plain", X ".dtd" => "text/xml", X ".xml" => "text/xml", X ".mpeg" => "video/mpeg", X ".mpg" => "video/mpeg", X ".mov" => "video/quicktime", X ".qt" => "video/quicktime", X ".avi" => "video/x-msvideo", X ".asf" => "video/x-ms-asf", X ".asx" => "video/x-ms-asf", X ".wmv" => "video/x-ms-wmv", X ".bz2" => "application/x-bzip", X ".tbz" => "application/x-bzip-compressed-tar", X ".tar.bz2" => "application/x-bzip-compressed-tar", X # default mime type X "" => "application/octet-stream", X ) X Xmimetype.use-xattr = "enable" X Xaccesslog.filename = "/var/log/lighttpd/default/access.log" X Xstatic-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) X Xserver.pid-file = "/var/run/lighttpd.pid" X Xserver.username = "www" Xserver.groupname = "www" X Xfastcgi.server = ( ".php" => X ( "localhost" => X ( X "socket" => "/var/run/lighttpd/php-fastcgi.socket", X "bin-path" => "/usr/local/bin/php-cgi", X "max-procs" => 2 X ) X ) X ) X X Xserver.stat-cache-engine = "fam" X Xserver.use-ipv6 = "enable" X$SERVER["socket"] == "0.0.0.0:80" { } 13d6c5353933d78bbe99686dc1205d95 echo x - sendfile/upload.php sed 's/^X//' >sendfile/upload.php << '5519f8f464a953c27a762163cfade428' X X Upload thingy X X X X
X
X
X
X

Choose a flash thingy to upload:

X
X
X X
X
X
X X X 5519f8f464a953c27a762163cfade428 echo x - sendfile/uploader.php sed 's/^X//' >sendfile/uploader.php << 'fe7d407dda27de3d9cfe521e27e7a469' X X X Upload! X X X X
X
X
X$rvalue\n"; X?> X
X
X X X fe7d407dda27de3d9cfe521e27e7a469 exit --------------040709090100010605060305--