1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Commit Graph

1119 Commits

Author SHA1 Message Date
David Carlier 2874e5fa05 FPM: Emit error for invalid port setting 2022-04-03 21:24:46 +01:00
Martin Kealey 2fc1ddc0f1 line break before --prefix in php-fpm man page 2022-03-27 17:44:31 +02:00
David CARLIER 814374faa1 fpm zlog_stream_buf_alloc_ex little simplifications. (#8224) 2022-03-24 00:13:51 +00:00
istiak101 bf2867bc72 Fix FSF address & update year to 2022
FSF mailing address was changed long time ago. This patch updates that address. Also updated year from 2021 to 2022.

Closes GH-8009.
2022-03-19 18:25:29 +01:00
Christoph M. Becker 1c381a7060 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bugtracker URL
2022-02-15 19:15:53 +01:00
Christoph M. Becker 720d6faa29 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bugtracker URL
2022-02-15 19:15:24 +01:00
Christoph M. Becker e98a7a68b7 Fix bugtracker URL
The php-src bugtracker is now on Github.

Closes GH-8102.
2022-02-15 19:14:07 +01:00
Jakub Zelenka 354c52e9b6 Merge branch 'PHP-8.1' 2022-02-09 23:24:38 +00:00
Jakub Zelenka 49087a65ee Merge branch 'PHP-8.0' into PHP-8.1 2022-02-09 23:23:05 +00:00
Till Backhaus 29fe06fa59 Fix bug #76109: Implement fpm_scoreboard_copy
fpm_scoreboard_copy locks the scoreboard while copying the scoreboard and all
proc scoreboards. proc scoreboards are locked one by one while copying each
struct. The old implementation (inside fpm_handle_status_request) only briefly
locked the scoreboard while copying the scorebard.

Closes GH-7931

Co-authored-by: Jakub Zelenka <bukka@php.net>
2022-02-09 23:02:45 +00:00
Christoph M. Becker d528d29ed4 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix memory leak on invalid port
2022-01-08 21:07:03 +01:00
Christoph M. Becker 2b07513192 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix memory leak on invalid port
2022-01-08 21:06:39 +01:00
David Carlier c99a026c9c Fix memory leak on invalid port
Closes GH-7911.
2022-01-08 21:04:55 +01:00
Jakub Zelenka c70f3e0239 Merge branch 'PHP-8.1' 2022-01-04 23:03:38 +00:00
Stefano Arlandini 46bec6de42 Fix the OpenMetrics response format returned by the FPM status page
Closes GH-7843, closes GH-7842
2022-01-04 23:01:10 +00:00
Christoph M. Becker 8147fec372 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix buffer allocations in zlog_stream_set_msg_suffix()
2021-12-28 13:29:42 +01:00
Christoph M. Becker 5d4bef0d0c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix buffer allocations in zlog_stream_set_msg_suffix()
2021-12-28 13:28:55 +01:00
David Carlier cb3d858745 Fix buffer allocations in zlog_stream_set_msg_suffix()
If that code was used, there would be a UAF scenario.

Closes GH-7835.
2021-12-28 13:27:54 +01:00
Jakub Zelenka c4a1c0c18c Merge branch 'PHP-8.1' 2021-11-27 22:43:37 +00:00
Jakub Zelenka a529d0dd15 Merge branch 'PHP-8.0' into PHP-8.1 2021-11-27 22:39:51 +00:00
Jakub Zelenka 81513e6285 Add skip for FPM process idle flaky test 2021-11-27 22:37:43 +00:00
Dmitry Stogov 067df26344 Use memrchr() when available
On x86_64 glibc memrchr() uses SSE/AVX CPU extensions and works much
faster then naive loop. On x86 32-bit we still use inlined version.

memrchr() is a GNU extension. Its prototype  becomes available when
<string.h> is included with defined _GNU_SOURCE macro. Previously, we
defined it in "php_config.h", but some sources may include <string.h>
befire it. To avod mess we also pass -D_GNU_SOURCE to C compiler.
2021-11-24 16:13:34 +03:00
Nikita Popov 7cbf4bde3e Merge branch 'PHP-8.1'
* PHP-8.1:
  Add FPM test for php_admin_value doc_root usage
  Fix for bug in file handling refactor.
2021-11-23 18:36:45 +01:00
Jakub Zelenka 435a5aca89 Add FPM test for php_admin_value doc_root usage
Closes GH-7673.
2021-11-23 18:36:04 +01:00
Jakub Zelenka 636e54a1cb Merge branch 'PHP-8.1' 2021-11-20 20:44:41 +00:00
Jakub Zelenka 79f0e486fd Merge branch 'PHP-8.0' into PHP-8.1 2021-11-20 20:44:02 +00:00
Jakub Zelenka 2f8407f185 Increase read timeout in FPM process idle test 2021-11-20 20:42:19 +00:00
Jakub Zelenka fc67967190 Increase script sleep in FPM process idle test 2021-11-20 20:42:19 +00:00
Jakub Zelenka 14db5fab11 Merge branch 'PHP-8.1' 2021-11-14 20:16:44 +00:00
Jakub Zelenka 48bc4ea758 Merge branch 'PHP-8.0' into PHP-8.1 2021-11-14 20:14:22 +00:00
Jakub Zelenka ec3d4409a4 Merge branch 'PHP-7.4' into PHP-8.0 2021-11-14 20:10:42 +00:00
Jakub Zelenka b2cf9b7ec7 Fix bug #81513 (Future possibility for heap overflow in FPM zlog)
This fixes currently unused code path in zlog that could lead to
the heap overflow in the future.
2021-11-14 20:08:57 +00:00
Nikita Popov e964c91bce Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix leaks for AppArmor based distros in case the profile creation fails
2021-11-12 14:26:16 +01:00
Nikita Popov 4a5d75e3ec Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix leaks for AppArmor based distros in case the profile creation fails
2021-11-12 14:26:03 +01:00
David Carlier b1e6fdefd4 Fix leaks for AppArmor based distros in case the profile creation fails
Closes GH-7646.
2021-11-12 14:25:52 +01:00
David CARLIER 1de405907d fpm allow process tracing/core dump on solaris systems. (#7548) 2021-11-03 22:26:43 +00:00
Dmitry Stogov 90b7bde615 Use more compact representation for packed arrays.
- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
  instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
  familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
  (ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
  (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
  ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
    - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
    - zend_hash_sort_ex() may require converting packed arrays to hash.
2021-11-03 15:18:26 +03:00
Stanislav Malyshev 9ab3bc69e8 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
  Add FPM fix news
  Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
2021-10-18 15:34:20 -07:00
Stanislav Malyshev 0acfd2d7b5 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
  Add FPM fix news
  Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
2021-10-18 15:23:08 -07:00
Jakub Zelenka fadb1f8c1d Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
The main change is to store scoreboard procs directly to the variable sized
array rather than indirectly through the pointer.

Signed-off-by: Stanislav Malyshev <stas@php.net>
2021-10-18 15:06:36 -07:00
Nikita Popov 4cdcbc828f Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix some FPM printf warnings on openbsd
2021-10-18 11:12:23 +02:00
David Carlier f71810fb6f Fix some FPM printf warnings on openbsd
Closes GH-7585.
2021-10-18 11:11:33 +02:00
Jakub Zelenka cb2021e5f6 Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
The main change is to store scoreboard procs directly to the variable sized
array rather than indirectly through the pointer.

Signed-off-by: Stanislav Malyshev <stas@php.net>
2021-10-17 20:16:10 -07:00
Nikita Popov 0c6c882b92 Merge branch 'PHP-8.1'
* PHP-8.1:
  Disable failing FPM test
2021-10-04 23:31:48 +02:00
Nikita Popov cd84480e54 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Disable failing FPM test
2021-10-04 23:31:40 +02:00
Nikita Popov a00d933242 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Disable failing FPM test
2021-10-04 23:31:31 +02:00
Nikita Popov 4c01bd2ade Disable failing FPM test
Test fails intermittently, e.g.:

https://dev.azure.com/phpazuredevops/PHP/_build/results?buildId=20597&view=ms.vss-test-web.build-test-results-tab&runId=475324&resultId=115501&paneView=debug

Possibly this is because the two requests end up being processed
in sequence and no second process is spawned.
2021-10-04 23:30:14 +02:00
Jakub Zelenka 582cd2ca7f Merge branch 'PHP-8.1' 2021-10-04 21:57:25 +01:00
Jakub Zelenka 7dd87b2343 Merge branch 'PHP-8.0' into PHP-8.1 2021-10-04 21:56:06 +01:00
Jakub Zelenka 9ed95846a3 Merge branch 'PHP-7.4' into PHP-8.0 2021-10-04 21:55:21 +01:00