History log of /php-src/ext/opcache/shared_alloc_mmap.c (Results 1 – 25 of 35)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 6fb8b9d7 18-Mar-2024 Bob Weinand

Fix possible segfault with 0x0 shared opcache base

Moving the minimum base of the shared opcache memory to the second huge page to avoid a possible 0x0 base, which may cause all sorts of seg

Fix possible segfault with 0x0 shared opcache base

Moving the minimum base of the shared opcache memory to the second huge page to avoid a possible 0x0 base, which may cause all sorts of segfaults.
This is not a problem on most systems which have a mmap_min_addr which is non-zero, but e.g. WSL1 doesn't have a minimum mapping address.

show more ...


# 00f9c5ee 08-Mar-2024 Ilija Tovilo

Remove MAP_JIT flag

This flag is supposed to go on the flags parameter, rather than prot. Moreover,
this flag is no longer needed because the JIT does not set RWX without ZTS, and
JI

Remove MAP_JIT flag

This flag is supposed to go on the flags parameter, rather than prot. Moreover,
this flag is no longer needed because the JIT does not set RWX without ZTS, and
JIT+ZTS has been disabled on macOS with Apple Silicon.

Closes GH-13638

show more ...


# e72f0c88 21-Feb-2024 Peter Kokot

Simplify prctl and procctl Autoconf checks (#13450)

The AC_CHECK_FUNCS checks whether the linker sees the function in the
usual libraries, in this case libc. This is a simple trick to al

Simplify prctl and procctl Autoconf checks (#13450)

The AC_CHECK_FUNCS checks whether the linker sees the function in the
usual libraries, in this case libc. This is a simple trick to also check
existence of belonging headers, since the code uses HAVE_PRCTL and
HAVE_PROCCTL to include headers and call functions.

show more ...


# 7cf1a2ad 12-Dec-2023 Ilija Tovilo

Fix SELinux mprotect execheap error due to mem adjacent to heap

It seems SELinux has a bug where memory directly adjacent to the heap is
interpreted as heap memory. Dodge this issue by l

Fix SELinux mprotect execheap error due to mem adjacent to heap

It seems SELinux has a bug where memory directly adjacent to the heap is
interpreted as heap memory. Dodge this issue by leaving some space between the
heap and memory suggested by find_prefered_mmap_base.

See GH-12932
See https://bugzilla.kernel.org/show_bug.cgi?id=218258
Closes GH-12942

show more ...


# 53909896 07-Dec-2023 Ilija Tovilo

Fix asan shadow memory and shared_alloc_mmap clash

The memory region found by find_prefered_mmap_base may clash with memory regions
reserved by asan for tracking memory. The symptom of t

Fix asan shadow memory and shared_alloc_mmap clash

The memory region found by find_prefered_mmap_base may clash with memory regions
reserved by asan for tracking memory. The symptom of this is that mprotect for
JIT fails adding the PROT_EXEC flag to the shared memory region.

Closes GH-12890

show more ...


# a2af8ac3 23-May-2023 LoongT4o <109949122+LoongT4o@users.noreply.github.com>

Fix the JIT buffer relocation failure at the corner case (#11266)

Avoid missing possible candidates due to the large address range of the free segment.
Eg, 

48000000-49400000 r-

Fix the JIT buffer relocation failure at the corner case (#11266)

Avoid missing possible candidates due to the large address range of the free segment.
Eg, 

48000000-49400000 r-xs 08000000 00:0f 39322841               segment1
7ffff2ec8000-7ffff2f49000 rw-p 00000000 00:00 0              segment2
7ffff6fae000-7ffff735c000 r-xp 00200000 08:02 11538515       /usr/local/sbin/php-fpm

original code will miss the opportunity between [7ffff2ec** - 7ffff2ec8000].

Fix issue #11265.

Signed-off-by: Long, Tao <tao.long@intel.com>
Signed-off-by: Dmitry Stogov <dmitrystogov@gmail.com>

show more ...


# 263b22f3 21-Feb-2023 Max Kellermann

Make lots of string pointers `const` (#10646)

This allows using string literals without implicitly casting away the
`const`.


# d3facbe2 23-Jan-2023 Max Kellermann

Mark globals as const (#10303)

This moves them from ``.data`` to ``.rodata`` and allows more compiler optimizations.

* ext/opcache/zend_accelerator_hash: make prime_numbers const

Mark globals as const (#10303)

This moves them from ``.data`` to ``.rodata`` and allows more compiler optimizations.

* ext/opcache/zend_accelerator_hash: make prime_numbers const

* Zend/zend_signal: make zend_sigs const

* ext/dba: make dba_handler pointers const

* ext/exif: make php_tiff_bytes_per_format and other globals const

* ext/intl/grapheme: make grapheme_extract_iters const

* ext/mstring: make rare_codepoint_bitvec const

* ext/snmp: make objid_mib const

* ext/opcache: make all zend_shared_memory_handlers const

show more ...


# 3660bc31 05-Nov-2022 David CARLIER

opcache fixing w/x pages creation on freebsd 13.1 and above.

By default, the system allows these but admin can disable them system wide.
However the procctl api permits to control it per

opcache fixing w/x pages creation on freebsd 13.1 and above.

By default, the system allows these but admin can disable them system wide.
However the procctl api permits to control it per process.

Closes GH-9896.

show more ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23
# e787d9a0 18-Aug-2022 David CARLIER

GH-9370: Fix opcache jit protection bits.

Allow mprotect to occur, pthread_jit_write_np are just to allow mprotect
flags to be used.

Closes #9371.

Revision tags: php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3
# 1977ef92 02-Jul-2022 David CARLIER

opcache find best candidate near .text segment for large maps on FreeBSD.
Follow up on #8890 using similar workflow, we go through the php binary mapping per address boundaries.

Closes #

opcache find best candidate near .text segment for large maps on FreeBSD.
Follow up on #8890 using similar workflow, we go through the php binary mapping per address boundaries.

Closes #8908.

show more ...

# 14ced88c 30-Jun-2022 Javier Eguiluz

[ci skip] Fix typo (anough → enough)

Closes GH-8901.

# 17aa81a5 30-Jun-2022 Dmitry Stogov

Allocate JIT bufer close to PHP .text segment to allow using direct IP-relative calls and jumps (#8890)

This implementation is based on https://github.com/php/php-src/pull/8618 developed by

Allocate JIT bufer close to PHP .text segment to allow using direct IP-relative calls and jumps (#8890)

This implementation is based on https://github.com/php/php-src/pull/8618 developed by Su Tao, Wang Xue, Chen Hu and Lizhen Lizhen.

show more ...

Revision tags: php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

Revision tags: php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1
# 8a134c9a 05-Mar-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in addition.


Revision tags: php-8.0.3, php-7.4.16
# ae23852e 27-Feb-2021 David Carlier

Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in addition.

Closes GH-6738.

Revision tags: php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27
# 559fc46b 30-Jan-2021 David CARLIER

Fix ubsan warning on macos

Closes GH-6652.

# 4414fd93 20-Jan-2021 David CARLIER

Distinguishing opcache SHM on stats tools for Mac

Closes GH-6628.

Revision tags: php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21
# 36219416 03-Aug-2020 David Carlier

Fix opcache JIT on NetBSD with PaX

When PaX mprotect active, opcache JIT test fail as it needs
the PROT_MPROTECT macro to be able to allow further permission
promotion with mprotect.

Fix opcache JIT on NetBSD with PaX

When PaX mprotect active, opcache JIT test fail as it needs
the PROT_MPROTECT macro to be able to allow further permission
promotion with mprotect.

Closes GH-5929.

show more ...

Revision tags: php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2
# ff8002fc 12-Jun-2019 Nikita Popov

Mark label as potentially unused

Revision tags: php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28
# 9a068760 01-Apr-2019 Dmitry Stogov

Added JIT compiler for x86 and x86_64

Revision tags: php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16, php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2
# da919a8b 05-Feb-2019 Dmitry Stogov

Remove copyright years.

Revision tags: php-7.2.15RC1, php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14, php-7.2.14RC1, php-7.3.1RC1, php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0
# 6a8260a0 28-Nov-2018 David Carlier

opcache/FreeBSD huge code page pragma support

Sort of following up on super pages support earlier, here
we also detect page mappings possibly eligible to go to
super pages.

Revision tags: php-7.1.25RC1, php-7.2.13RC1, php-7.3.0RC6, php-7.1.24, php-7.2.12, php-7.3.0RC5
# 67e0138c 01-Nov-2018 Zeev Suraski

Future-proof email addresses...

12