Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50568 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40857 invoked from network); 25 Nov 2010 19:01:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2010 19:01:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:43215] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/3B-16484-A82BEEC4 for ; Thu, 25 Nov 2010 14:01:31 -0500 Received: by fxm11 with SMTP id 11so1031586fxm.29 for ; Thu, 25 Nov 2010 11:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=bNW9P8brDARvCJwAzkPkMoSimcIDDBOY82Y9TQfIepk=; b=ffQlGlTeGh5dN34J/asCFPOHfJWYr9/L27pdlASXR6I/OT6g4nmqsyok2TXm7wTnqK 841LGh0OoOto17BJen9k+czSaevZ5ysziL7vTwMUer71bqG8Yf0bUGUs/Hxx0JAJb/Dh +TvfY4vGiaKlEMeXd6lC3AdCb3urgHniL1GzE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=lJ6IVkWLxfE6+Wa9P1k5gIeNfKpYQaiD6p7FnoUL+LEm8S26pzvYaYj9VO2cG8WXvF Zh9V/+gfHVyiI28MaeMOC96MQHZ0XoSzHul5njSwM9e2Ai3BqyjkvQPsAWtbjmoE61U8 5S4jbvpxDGh4UmLC4RejkX9VvfWpalukuZwyA= MIME-Version: 1.0 Received: by 10.223.125.136 with SMTP id y8mr1111889far.149.1290711687257; Thu, 25 Nov 2010 11:01:27 -0800 (PST) Received: by 10.223.83.142 with HTTP; Thu, 25 Nov 2010 11:01:27 -0800 (PST) In-Reply-To: <4CEEB07E.4050004@lerdorf.com> References: <73.C4.59959.876BBEC4@pb1.pair.com> <3EA67EA2-A9B1-4DFB-8A30-05B37BCA313B@iki.fi> <8757232E56758B42B2EE4F9D2CA019C9154B70@US-EX2.zend.net> <1290705653.7033.73.camel@guybrush> <4CEE9C5F.3040206@lerdorf.com> <4CEEAA2C.2080308@lerdorf.com> <8757232E56758B42B2EE4F9D2CA019C9154E82@US-EX2.zend.net> <4CEEB07E.4050004@lerdorf.com> Date: Thu, 25 Nov 2010 20:01:27 +0100 Message-ID: To: Rasmus Lerdorf Cc: Andi Gutmans , Ilia Alshanetsky , =?ISO-8859-1?Q?Johannes_Schl=FCter?= , "davey@php.net" , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: Hold off 5.4 From: pierre.php@gmail.com (Pierre Joye) On Thu, Nov 25, 2010 at 7:52 PM, Rasmus Lerdorf wrote: > On 11/25/10 10:43 AM, Pierre Joye wrote: >> On Thu, Nov 25, 2010 at 7:33 PM, Andi Gutmans wrote: >>>> -----Original Message----- >>>> From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com] >>>> Sent: Thursday, November 25, 2010 10:26 AM >>>> To: Ilia Alshanetsky >>>> Cc: Johannes Schl=FCter; Andi Gutmans; Jani Taskinen; davey@php.net; P= HP >>>> Internals >>>> Subject: Re: [PHP-DEV] Re: Hold off 5.4 >>>> >>>> We also need that non-null zend_parse_parameters type implemented to c= lean >>>> up the null-byte poisoning fixes in 5.3. =A0I can't see this slowing u= s down much as >>>> it is pretty trivial. =A0Just takes someone to sit down for a couple o= f hours and >>>> implementing it and finding all the places where parameters end up in = paths. >>>> There are probably other places we don't want nulls either that curren= tly have >>>> local checks that can be removed. >>> >>> Yes I agree. We may be able to skip this check for interned strings whi= ch would be nice and potentially eliminate performance impact somewhat but = it's something that would need to be looked into. It's non-trivial but doab= le (need to add a flag for interned strings whether they have a zero byte o= r not). >> >> What do you think about a path argument? Returning something like >> zend_file_handle with some more meta info. Doing so will let us pass >> all the way down to the actual file API system call without having to >> duplicate opearions (stat, perms, etc.) as each ops will simply set >> the member accordingly. > > It wouldn't work in place of the non-null type. =A0There are a number of > places where we are passing just filenames and it is up to the lower > level functions to figure out what to do with these and also places > where we just pass fragments or we pass stuff into things like the > session extension or database LOB calls. =A0So, even if we did come up > with a zend_file_handle type, we would still need the non-null type for > all the places where we don't have a complete path. > > Also, I am curious where you think we have duplicate operations like that= ? I noticed it where functions accepts a path, do some checks (exists, writable, etc.), resolves paths, etc. and then similar ops are done again in a couple of places before we call the low level functions, like in stream, tsrm for example, or extension using other extension's streams. The idea is that file.absolute_path, file.original_path, or file.resolved_path (example member names) will be passed to the low level APIs, where each of them have been checked for NULL as well. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org