Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Nikita Popov
On Thu, Nov 26, 2015 at 8:35 PM, Niklas Keller wrote: > Would this be a catchable Error (implementing Throwable) or a real fatal? > Having a real fatal could lead to a DOS in Aerys as you'd be able to crash > workers with carefully crafted input variables then. > It would be a

Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Thomas Hruska
On 11/27/2015 9:12 AM, Nikita Popov wrote: On Thu, Nov 26, 2015 at 8:35 PM, Niklas Keller wrote: Would this be a catchable Error (implementing Throwable) or a real fatal? Having a real fatal could lead to a DOS in Aerys as you'd be able to crash workers with carefully

Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Jakub Zelenka
Hi, On Thu, Nov 26, 2015 at 5:24 PM, Nikita Popov wrote: > > > What are your thoughts on this? > > First of all, thanks a lot for looking into it! That's great! I think that it's all cool except the fact that json_decode would result in fatal error. I don't think that

Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Niklas Keller
Currently it's not catchable, that's my main concern. If it's catchable, it's not that much of a problem. Regards, Niklas 2015-11-27 10:05 GMT+01:00 Yasuo Ohgaki : > Hi Nikita, > > On Fri, Nov 27, 2015 at 2:24 AM, Nikita Popov > wrote: > > What are

RE: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores

2015-11-27 Thread Pascal KISSIAN
Hi Johannes, thanks for the answer, -Message d'origine- De : Johannes Schlüter [mailto:johan...@schlueters.de] Envoyé : vendredi 27 novembre 2015 14:42 À : Pascal KISSIAN Cc : internals@lists.php.net Objet : Re: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using

Re: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores

2015-11-27 Thread Johannes Schlüter
On Fri, 2015-11-27 at 11:02 +0100, Pascal KISSIAN wrote: > > I made a simple test to know if it was possible to speed-up php > performance > by using parallel programming. [...] > Use : > > OMP_NUM_THREADS=xx /path_to/php test_file.php Your test runs a single PHP process. Mind that in a

[PHP-DEV] Benchmark Results for PHP Master 2015-11-27

2015-11-27 Thread lp_benchmark_robot
Results for project PHP master, build date 2015-11-27 14:24:32+02:00 commit: 95283a050473ee433af0fe235852d990425b4e87 revision date: 2015-11-26 16:57:11+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

RE: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores

2015-11-27 Thread Anatol Belski
Hi Pascal, > -Original Message- > From: Pascal KISSIAN [mailto:php-mailing-l...@lool.fr] > Sent: Friday, November 27, 2015 11:03 AM > To: internals@lists.php.net > Subject: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for > php7 using 4 cores > Importance: High > > Hi

RE: [PHP-DEV] HashDos protection

2015-11-27 Thread Anatol Belski
Hi Nikita, > -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Thursday, November 26, 2015 6:25 PM > To: PHP internals ; Anatol Belski > ; Remi Collet > Subject: [PHP-DEV] HashDos protection > > Hi

[PHP-DEV] RE: HashDos protection

2015-11-27 Thread Pascal KISSIAN
-Message d'origine- De : Nikita Popov [mailto:nikita@gmail.com] Envoyé : jeudi 26 novembre 2015 18:25 À : PHP internals; Anatol Belski; Remi Collet Objet : HashDos protection >Hi internals! >his mail turned out to be rather long, so I'll start with a TL;DR: >To fix the HashDos

Re: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores

2015-11-27 Thread Jan Ehrhardt
Johannes Schlüter in php.internals (Fri, 27 Nov 2015 14:41:33 +0100): >On Fri, 2015-11-27 at 11:02 +0100, Pascal KISSIAN wrote: >> >> I made a simple test to know if it was possible to speed-up php >> performance by using parallel programming. > >Your test runs a single PHP process. Mind that in

Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Thomas Hruska
On 11/27/2015 2:21 PM, Yasuo Ohgaki wrote: Hi Thomas, In practice, we wouldn't have problems with max number of collisions. Is CLI going to be or can CLI be excluded from max collisions? After thinking about it for a long while, that's my only area of concern here. SAPI can (fatal) error

Re: [PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores

2015-11-27 Thread Johannes Schlüter
On Fri, 2015-11-27 at 15:27 +0100, Pascal KISSIAN wrote: > Hi Johannes, > thanks for the answer, > > -Message d'origine- > De : Johannes Schlüter [mailto:johan...@schlueters.de] > Envoyé : vendredi 27 novembre 2015 14:42 > À : Pascal KISSIAN > Cc : internals@lists.php.net > Objet : Re:

Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Yasuo Ohgaki
Hi Thomas, On Sat, Nov 28, 2015 at 2:07 AM, Thomas Hruska wrote: > I don't know if anyone has suggested this before, but why not have a > function that application developers can call to switch hash modes and > support multiple hash modes in the core? > > I've always

[PHP-DEV] Proof of Concept : 3.5x and more Performance Boost for php7 using 4 cores

2015-11-27 Thread Pascal KISSIAN
Hi everybody, I made a simple test to know if it was possible to speed-up php performance by using parallel programming. I modified 2 functions within ./ext/standard/array.c file of PHP-7.0.0RC7 to use openmp and added the -fopenmp flag to the compiler flags in the Makefile. I

Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Yasuo Ohgaki
Hi Nikita, On Fri, Nov 27, 2015 at 2:24 AM, Nikita Popov wrote: > What are your thoughts on this? Great! This is exactly what I was thinking. I prefer collision counting rather than slower hash function. Hardcoded collision max (1000) seems ok for me. Catchable fatal

Re: [PHP-DEV] HashDos protection

2015-11-27 Thread Leigh
On Thu, 26 Nov 2015 at 17:25 Nikita Popov wrote: > This will throw a fatal error if the number of > collisions during an insertion operation exceed a certain threshold. > To me this feels like it's just moving a DoS vector from one place to another. As Niklas already